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 Documentation

std::string _filename
std::string _dir
std::string _subdir
std::string _envvar

Detailed Description
Periodic Table of the Elements.

Translating element data is a common task given that many file formats give either element symbol or atomic
number information, but not both. The OBElementTable class facilitates conversion between textual and
numeric element information. An instance of the OBElementTable class (etab) is declared as external in
data.cpp. Source files that include the header file mol.h automatically have an extern definition to etab. The
following code sample demonstrates the use of the OBElementTable class:

cout << "The symbol for element 6 is " << etab.GetSymbol(6) << endl;
cout << "The atomic number for Sulfur is " << etab.GetAtomicNum(16) << endl;
cout << "The van der Waal radius for Nitrogen is " << etab.GetVdwRad(7);

Stored information in the OBElementTable includes elemental:

• symbols
• covalent radii
• van der Waal radii
• expected maximum bonding valence
• molar mass (by IUPAC recommended atomic masses)
• electronegativity (Pauling and Allred-Rochow)
• ionization potential
• electron affinity
• RGB colors for visualization programs
• names (by IUPAC recommendation)

Constructor & Destructor Documentation

OBElementTable ( void )

~OBElementTable ( )

Member Function Documentation

void ParseLine ( const char * ) [virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

Protected Attributes 351


Open Babel: API Documentation

unsigned int GetNumberOfElements ( )

Returns:
the number of elements in the periodic table

unsigned int GetSize ( ) [inline, virtual]

Returns:
the number of elements in the periodic table

Reimplemented from OBGlobalDataBase.

const
int GetAtomicNum ( char sym )
*

Deprecated:
Does not properly handle 'D' or 'T' hydrogen isotopes

Referenced by AliasData::Expand().

int GetAtomicNum ( const char * sym,


int & iso
)

Returns:
the atomic number matching the element symbol passed or 0 if not defined. For 'D' or 'T' hydrogen
isotopes, will return a value in the second argument

const char * GetSymbol ( int atomicnum )

Returns:
the element symbol matching the atomic number passed

Referenced by OpenBabel::CalculateSymmetry(), and OBMol::GetSpacedFormula().

double GetVdwRad ( int atomicnum )

Returns:
the van der Waals radius for this atomic number

double GetCovalentRad ( int atomicnum )

Member Function Documentation 352


Open Babel: API Documentation

Returns:
the covalent radius for this atomic number

Referenced by OBMol::ConnectTheDots().

double GetMass ( int atomicnum )

Returns:
the average atomic mass for this element. For exact isotope masses, use OpenBabel::OBIsotopeTable

Referenced by OBAtom::GetAtomicMass(), and OBMol::GetMolWt().

double CorrectedBondRad ( int atomicnum,


int hyb = 3
)

Returns:
a "corrected" bonding radius based on the hybridization. Scales the covalent radius by 0.95 for sp2
and 0.90 for sp hybrids

Referenced by OBMol::AddHydrogens(), OBBond::GetEquibLength(), OBAtom::HtoMethyl(), and


OBAtom::SetHybAndGeom().

double CorrectedVdwRad ( int atomicnum,


int hyb = 3
)

Returns:
a "corrected" vdW radius based on the hybridization. Scales the van der Waals radius by 0.95 for sp2
and 0.90 for sp hybrids

int GetMaxBonds ( int atomicnum )

Returns:
the maximum expected number of bonds to this element

Referenced by OBMol::ConnectTheDots(), and OBMol::PerceiveBondOrders().

double GetElectroNeg ( int atomicnum )

Returns:
the Pauling electronegativity for this element

Referenced by OBMol::PerceiveBondOrders().

Member Function Documentation 353


Open Babel: API Documentation

double GetAllredRochowElectroNeg ( int atomicnum )

Returns:
the Allred-Rochow electronegativity for this element

double GetIonization ( int atomicnum )

Returns:
the ionization potential (in eV) for this element

double GetElectronAffinity ( int atomicnum )

Returns:
the electron affinity (in eV) for this element

vector< double > GetRGB ( int atomicnum )

Returns:
a vector with red, green, blue color values for this element

string GetName ( int atomicnum )

Returns:
the name of this element

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().

Member Function Documentation 354


Open Babel: API Documentation

[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.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),

Member Data Documentation 355


Open Babel: API Documentation

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:

• data.h
• data.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.

Member Data Documentation 356


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

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

Member Data Documentation 357


OBError Member List
This is the complete list of members for OBError, including all inherited members.

_errorMsg OBError [protected]


_explanation OBError [protected]
_level OBError [protected]
_method OBError [protected]
_possibleCause OBError [protected]
_suggestedRemedy OBError [protected]
GetError() const OBError [inline]
GetExplanation() const OBError [inline]
GetLevel() const OBError [inline]
GetMethod() const OBError [inline]
GetPossibleCause() const OBError [inline]
GetSuggestedRemedy() const OBError [inline]
message(void) const OBError
OBError(const std::string &method="", const std::string &errorMsg="", const
std::string &explanation="", const std::string &possibleCause="", const OBError
std::string &suggestedRemedy="", const obMessageLevel=obDebug)
operator<<(std::ostream &os, const OBError &er) OBError [friend]
operator==(const OBError &) const OBError

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

OBError Member List 358


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBError

OBError Member List 359


OBError Class Reference
Customizable error handling and logging -- store a message, including the method yielding the error, causes,
etc. More...

#include <openbabel/oberror.h>

List of all members.

Public Member Functions


OBError (const std::string &method="", const std::string &errorMsg="", const std::string
&explanation="", const std::string &possibleCause="", const std::string
&suggestedRemedy="", const obMessageLevel=obDebug)
std::string message (void) const
std::string GetMethod () const
std::string GetError () const
std::string GetExplanation () const
std::string GetPossibleCause () const
std::string GetSuggestedRemedy () const
obMessageLevel GetLevel () const
bool operator== (const OBError &) const

Protected Attributes
std::string _method
std::string _errorMsg
std::string _explanation
std::string _possibleCause
std::string _suggestedRemedy
obMessageLevel _level

Friends
std::ostream & operator<< (std::ostream &os, const OBError &er)

Detailed Description
Customizable error handling and logging -- store a message, including the method yielding the error, causes,
etc.

Constructor & Destructor Documentation

OBError ( const std::string & method = "",

OBError Class Reference 360


Open Babel: API Documentation

const std::string & errorMsg = "",


const std::string & explanation = "",
possibleCause =
const std::string &
"",
suggestedRemedy =
const std::string &
"",
const obMessageLevel level = obDebug
)
Constructor for an error message e.g. OBError(__FUNCTION__, " message ").

Member Function Documentation

string message ( void ) const

Returns:
A formatted message string, including optional explanations, etc.

Referenced by OBMessageHandler::GetMessagesOfLevel().

const
std::string GetMethod ( )
[inline]

Returns:
The method which caused this error (typically supplied via the __FUNCTION__ compiler macro

const
std::string GetError ( )
[inline]

Returns:
The main error message

Referenced by OBError::operator==().

std::string GetExplanation ( ) const [inline]

Returns:
A more detailed explanation of the error (optional)

std::string GetPossibleCause ( ) const [inline]

Returns:
A possible cause for the error (optional)

Constructor & Destructor Documentation 361


Open Babel: API Documentation

const
std::string GetSuggestedRemedy ( )
[inline]

Returns:
The suggested workaround or remedy for the error (optional)

obMessageLevel GetLevel ( ) const [inline]

Returns:
The severity level of this error

Referenced by OBMessageHandler::GetMessagesOfLevel(), and OBMessageHandler::ThrowError().

bool operator== ( const OBError & other ) const

Friends And Related Function Documentation

std::ostream
std::ostream& operator<< ( os,
&
const
er
OBError &
) [friend]
Output a formatted message string.

Member Data Documentation

std::string _method [protected]


The method causing the error (typically from the compiler macro __FUNCTION__).

Referenced by OBError::message().

std::string _errorMsg [protected]


The actual error message.

Referenced by OBError::message().

std::string _explanation [protected]


Optional explanation message: more detailed than the brief error.

Referenced by OBError::message().

Member Function Documentation 362


Open Babel: API Documentation

std::string _possibleCause [protected]


Optional cause message.

Referenced by OBError::message().

std::string _suggestedRemedy [protected]


Optional workaround or remedy.

Referenced by OBError::message().

obMessageLevel _level [protected]


The severity level: used for filtering via OBMessageHandler.

Referenced by OBError::message().

The documentation for this class was generated from the following files:

• oberror.h
• oberror.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 363


OBExternalBond Member List
This is the complete list of members for OBExternalBond, including all inherited members.

GetAtom() const OBExternalBond [inline]


GetBond() const OBExternalBond [inline]
GetIdx() const OBExternalBond [inline]
OBExternalBond() OBExternalBond [inline]
OBExternalBond(OBAtom *, OBBond *, int) OBExternalBond
OBExternalBond(const OBExternalBond &) OBExternalBond
SetAtom(OBAtom *atom) OBExternalBond [inline]
SetBond(OBBond *bond) OBExternalBond [inline]
SetIdx(int idx) OBExternalBond [inline]
~OBExternalBond() OBExternalBond [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
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBExternalBond

OBExternalBond Member List 364


OBExternalBond Class Reference
Used to store information on an external bond (e.g., SMILES fragments). More...

#include <openbabel/generic.h>

List of all members.

Public Member Functions


OBExternalBond ()
OBExternalBond (OBAtom *, OBBond *, int)
OBExternalBond (const OBExternalBond &)
~OBExternalBond ()
int GetIdx () const
OBAtom * GetAtom () const
OBBond * GetBond () const
void SetIdx (int idx)
void SetAtom (OBAtom *atom)
void SetBond (OBBond *bond)

Detailed Description
Used to store information on an external bond (e.g., SMILES fragments).

Constructor & Destructor Documentation

OBExternalBond ( ) [inline]

OBExternalBond ( OBAtom * atom,


OBBond * bond,
int idx
)

OBExternalBond ( const OBExternalBond & src )

~OBExternalBond ( ) [inline]

OBExternalBond Class Reference 365


Open Babel: API Documentation

Member Function Documentation

int GetIdx ( ) const [inline]

const
OBAtom* GetAtom ( )
[inline]

OBBond* GetBond ( ) const [inline]

void SetIdx ( int idx ) [inline]

void SetAtom ( OBAtom * atom ) [inline]

void SetBond ( OBBond * bond ) [inline]

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

Member Function Documentation 366


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 367


OBExternalBondData Member List
This is the complete list of members for OBExternalBondData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vexbnd OBExternalBondData [protected]
[inline,
Clone(OBBase *) const OBExternalBondData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() OBExternalBondData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBExternalBondData() OBExternalBondData
OBGenericData(const std::string attr="undefined", const unsigned
int type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(OBAtom *, OBBond *, int) OBExternalBondData
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.

• Main Page
• Related Pages

OBExternalBondData Member List 368


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

OpenBabel::OBExternalBondData

OBExternalBondData Member List 369


OBExternalBondData Class Reference
Used to store information on external bonds (e.g., in SMILES fragments). More...

#include <openbabel/generic.h>

Inheritance diagram for OBExternalBondData:

[legend]

List of all members.

Public Member Functions


OBExternalBondData ()
virtual OBGenericData * Clone (OBBase *) const
void SetData (OBAtom *, OBBond *, int)
std::vector< OBExternalBond > * 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

Protected Attributes
std::vector< OBExternalBond > _vexbnd
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to store information on external bonds (e.g., in SMILES fragments).

OBExternalBondData Class Reference 370


Open Babel: API Documentation

Constructor & Destructor Documentation

OBExternalBondData ( )

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetData ( OBAtom * atom,


OBBond * bond,
int idx
)

std::vector<OBExternalBond>* 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().

[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().

Constructor & Destructor Documentation 371


Open Babel: API Documentation

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<OBExternalBond> _vexbnd [protected]

Referenced by OBExternalBondData::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

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 Function Documentation 372


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 373


OBFFCalculation2 Member List
This is the complete list of members for OBFFCalculation2, including all inherited members.

a OBFFCalculation2
b OBFFCalculation2
energy OBFFCalculation2
force_a OBFFCalculation2
force_b OBFFCalculation2
idx_a OBFFCalculation2
idx_b OBFFCalculation2
pos_a OBFFCalculation2
pos_b OBFFCalculation2
SetupPointers() OBFFCalculation2 [inline, virtual]
~OBFFCalculation2() OBFFCalculation2 [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::OBFFCalculation2

OBFFCalculation2 Member List 374


OBFFCalculation2 Class Reference
Internal class for OBForceField to hold energy and gradient calculations on specific force fields. More...

#include <openbabel/forcefield.h>

Inheritance diagram for OBFFCalculation2:

[legend]

List of all members.

Public Member
Functions
virtual ~OBFFCalculation2 ()
virtual void SetupPointers ()

Public Attributes
double energy
OBAtom * a
OBAtom * b
int idx_a
int idx_b
double * pos_a
double * pos_b
double force_a [3]
double force_b [3]

Detailed Description
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.

OBFFCalculation2 Class Reference 375


Open Babel: API Documentation

Constructor & Destructor Documentation

virtual ~OBFFCalculation2 ( ) [inline, virtual]


Destructor.

Member Function Documentation

virtual void SetupPointers ( ) [inline, virtual]

Returns:
Setup pointers to atom positions and forces (To be called while setting up calculations). Sets
optimized to true.

Reimplemented in OBFFCalculation3, and OBFFCalculation4.

Member Data Documentation

double energy
Used to store the energy for this OBFFCalculation.

OBAtom* a
Used to store the atoms for this OBFFCalculation.

OBAtom * b

int idx_a
Used to store the index of atoms for this OBFFCalculation.

int idx_b

double* pos_a
Pointer to atom coordinates as double[3].

double * pos_b

double force_a[3]
Pointer to atom forces.

Constructor & Destructor Documentation 376


Open Babel: API Documentation

double force_b[3]

The documentation for this class was generated from the following file:

• forcefield.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:56 2008 by 1.5.6.

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

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

Member Data Documentation 377


OBFFCalculation3 Member List
This is the complete list of members for OBFFCalculation3, including all inherited members.

a OBFFCalculation2
b OBFFCalculation2
c OBFFCalculation3
energy OBFFCalculation2
force_a OBFFCalculation2
force_b OBFFCalculation2
force_c OBFFCalculation3
idx_a OBFFCalculation2
idx_b OBFFCalculation2
idx_c OBFFCalculation3
pos_a OBFFCalculation2
pos_b OBFFCalculation2
pos_c OBFFCalculation3
SetupPointers() OBFFCalculation3 [inline, virtual]
~OBFFCalculation2() OBFFCalculation2 [inline, virtual]
~OBFFCalculation3() OBFFCalculation3 [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

OBFFCalculation3 Member List 378


Open Babel: API Documentation

• Class Members

OpenBabel::OBFFCalculation3

OBFFCalculation3 Member List 379


OBFFCalculation3 Class Reference
Internal class for OBForceField to hold energy and gradient calculations on specific force fields. More...

#include <openbabel/forcefield.h>

Inheritance diagram for OBFFCalculation3:

[legend]

List of all members.

Public Member
Functions
virtual ~OBFFCalculation3 ()
virtual void SetupPointers ()

Public Attributes
OBAtom * c
int idx_c
double * pos_c
double force_c [3]
double energy
OBAtom * a
OBAtom * b
int idx_a
int idx_b
double * pos_a
double * pos_b
double force_a [3]
double force_b [3]

OBFFCalculation3 Class Reference 380


Open Babel: API Documentation

Detailed Description
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.

Constructor & Destructor Documentation

virtual ~OBFFCalculation3 ( ) [inline, virtual]


Destructor.

Member Function Documentation

virtual void SetupPointers ( ) [inline, virtual]

Returns:
Setup pointers to atom positions and forces (To be called while setting up calculations). Sets
optimized to true.

Reimplemented from OBFFCalculation2.

Reimplemented in OBFFCalculation4.

Member Data Documentation

OBAtom* c
Used to store the atoms for this OBFFCalculation.

int idx_c
Used to store the index of atoms for this OBFFCalculation.

double* pos_c
Pointer to atom coordinates as double[3].

double force_c[3]
Pointer to atom forces.

double energy [inherited]


Used to store the energy for this OBFFCalculation.

OBAtom* a [inherited]

Detailed Description 381


Open Babel: API Documentation

Used to store the atoms for this OBFFCalculation.

OBAtom * b [inherited]

int idx_a [inherited]


Used to store the index of atoms for this OBFFCalculation.

int idx_b [inherited]

double* pos_a [inherited]


Pointer to atom coordinates as double[3].

double * pos_b [inherited]

double force_a[3] [inherited]


Pointer to atom forces.

double force_b[3] [inherited]

The documentation for this class was generated from the following file:

• forcefield.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:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

Member Data Documentation 382


Open Babel: API Documentation
• Classes
• Files

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

Member Data Documentation 383


OBFFCalculation4 Member List
This is the complete list of members for OBFFCalculation4, including all inherited members.

a OBFFCalculation2
b OBFFCalculation2
c OBFFCalculation3
d OBFFCalculation4
energy OBFFCalculation2
force_a OBFFCalculation2
force_b OBFFCalculation2
force_c OBFFCalculation3
force_d OBFFCalculation4
idx_a OBFFCalculation2
idx_b OBFFCalculation2
idx_c OBFFCalculation3
idx_d OBFFCalculation4
pos_a OBFFCalculation2
pos_b OBFFCalculation2
pos_c OBFFCalculation3
pos_d OBFFCalculation4
SetupPointers() OBFFCalculation4 [inline, virtual]
~OBFFCalculation2() OBFFCalculation2 [inline, virtual]
~OBFFCalculation3() OBFFCalculation3 [inline, virtual]
~OBFFCalculation4() OBFFCalculation4 [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

OBFFCalculation4 Member List 384


Open Babel: API Documentation
• Classes
• Files

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

OpenBabel::OBFFCalculation4

OBFFCalculation4 Member List 385


OBFFCalculation4 Class Reference
Internal class for OBForceField to hold energy and gradient calculations on specific force fields. More...

#include <openbabel/forcefield.h>

Inheritance diagram for OBFFCalculation4:

[legend]

List of all members.

Public Member
Functions
virtual ~OBFFCalculation4 ()
void SetupPointers ()

Public Attributes
OBAtom * d
int idx_d
double * pos_d
double force_d [3]
OBAtom * c
int idx_c
double * pos_c
double force_c [3]
double energy
OBAtom * a
OBAtom * b
int idx_a
int idx_b
double * pos_a
double * pos_b
double force_a [3]
double force_b [3]

OBFFCalculation4 Class Reference 386


Open Babel: API Documentation

Detailed Description
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.

Constructor & Destructor Documentation

virtual ~OBFFCalculation4 ( ) [inline, virtual]


Destructor.

Member Function Documentation

void SetupPointers ( ) [inline, virtual]

Returns:
Setup pointers to atom positions and forces (To be called while setting up calculations). Sets
optimized to true.

Reimplemented from OBFFCalculation3.

Member Data Documentation

OBAtom* d
Used to store the atoms for this OBFFCalculation.

int idx_d
Used to store the index of atoms for this OBFFCalculation.

double* pos_d
Pointer to atom coordinates as double[3].

double force_d[3]
Pointer to atom forces.

OBAtom* c [inherited]
Used to store the atoms for this OBFFCalculation.

int idx_c [inherited]


Used to store the index of atoms for this OBFFCalculation.

Detailed Description 387


Open Babel: API Documentation

double* pos_c [inherited]


Pointer to atom coordinates as double[3].

double force_c[3] [inherited]


Pointer to atom forces.

double energy [inherited]


Used to store the energy for this OBFFCalculation.

OBAtom* a [inherited]
Used to store the atoms for this OBFFCalculation.

OBAtom * b [inherited]

int idx_a [inherited]


Used to store the index of atoms for this OBFFCalculation.

int idx_b [inherited]

double* pos_a [inherited]


Pointer to atom coordinates as double[3].

double * pos_b [inherited]

double force_a[3] [inherited]


Pointer to atom forces.

double force_b[3] [inherited]

The documentation for this class was generated from the following file:

• forcefield.h

Member Data Documentation 388


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 389


OBFFConstraint Member List
This is the complete list of members for OBFFConstraint, including all inherited members.

a OBFFConstraint
b OBFFConstraint
c OBFFConstraint
constraint_value OBFFConstraint
d OBFFConstraint
factor OBFFConstraint
GetGradient(int a) OBFFConstraint [inline]
grada OBFFConstraint
gradb OBFFConstraint
gradc OBFFConstraint
gradd OBFFConstraint
ia OBFFConstraint
ib OBFFConstraint
ic OBFFConstraint
id OBFFConstraint
OBFFConstraint() OBFFConstraint [inline]
rab0 OBFFConstraint
rbc0 OBFFConstraint
type OBFFConstraint
~OBFFConstraint() OBFFConstraint [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

OBFFConstraint Member List 390


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBFFConstraint

OBFFConstraint Member List 391


OBFFConstraint Class Reference
Internal class for OBForceField to hold constraints. More...

#include <openbabel/forcefield.h>

List of all members.

Public Member
Functions
OBFFConstraint ()
~OBFFConstraint ()
vector3 GetGradient (int a)

Public Attributes
double factor
double constraint_value
double rab0
double rbc0
int type
int ia
int ib
int ic
int id
OBAtom * a
OBAtom * b
OBAtom * c
OBAtom * d
vector3 grada
vector3 gradb
vector3 gradc
vector3 gradd

Detailed Description
Internal class for OBForceField to hold constraints.

Since:
version 2.2

OBFFConstraint Class Reference 392


Open Babel: API Documentation

Constructor & Destructor Documentation

OBFFConstraint ( ) [inline]
Constructor.

~OBFFConstraint ( ) [inline]
Destructor.

Member Function Documentation

vector3 GetGradient ( int a ) [inline]

Member Data Documentation

double factor
Used to store the contraint energy for this OBFFConstraint.

Referenced by OBFFConstraints::AddAngleConstraint(), OBFFConstraints::AddAtomConstraint(),


OBFFConstraints::AddAtomXConstraint(), OBFFConstraints::AddAtomYConstraint(),
OBFFConstraints::AddAtomZConstraint(), OBFFConstraints::AddDistanceConstraint(), and
OBFFConstraints::AddTorsionConstraint().

double constraint_value

Referenced by OBFFConstraints::AddAngleConstraint(), OBFFConstraints::AddDistanceConstraint(), and


OBFFConstraints::AddTorsionConstraint().

double rab0

double rbc0

int type
Used to store the contraint type for this OBFFConstraint.

Referenced by OBFFConstraints::AddAngleConstraint(), OBFFConstraints::AddAtomConstraint(),


OBFFConstraints::AddAtomXConstraint(), OBFFConstraints::AddAtomYConstraint(),
OBFFConstraints::AddAtomZConstraint(), OBFFConstraints::AddDistanceConstraint(),
OBFFConstraints::AddIgnore(), and OBFFConstraints::AddTorsionConstraint().

Constructor & Destructor Documentation 393


Open Babel: API Documentation

int ia

Referenced by OBFFConstraints::AddAngleConstraint(), OBFFConstraints::AddAtomConstraint(),


OBFFConstraints::AddAtomXConstraint(), OBFFConstraints::AddAtomYConstraint(),
OBFFConstraints::AddAtomZConstraint(), OBFFConstraints::AddDistanceConstraint(),
OBFFConstraints::AddIgnore(), and OBFFConstraints::AddTorsionConstraint().

int ib

Referenced by OBFFConstraints::AddAngleConstraint(), OBFFConstraints::AddDistanceConstraint(), and


OBFFConstraints::AddTorsionConstraint().

int ic

Referenced by OBFFConstraints::AddAngleConstraint(), and OBFFConstraints::AddTorsionConstraint().

int id

Referenced by OBFFConstraints::AddTorsionConstraint().

OBAtom* a
Used to store the atoms for this OBFFCostraint.

OBAtom * b

OBAtom * c

OBAtom * d

vector3 grada
Used to store the gradients for this OBFFCalculation.

vector3 gradb

vector3 gradc

vector3 gradd

Member Data Documentation 394


Open Babel: API Documentation

The documentation for this class was generated from the following file:

• forcefield.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:56 2008 by 1.5.6.

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

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

Member Data Documentation 395


OBFFConstraints Member List
This is the complete list of members for OBFFConstraints, including all inherited members.

AddAngleConstraint(int a, int b, int c, double angle) OBFFConstraints


AddAtomConstraint(int a) OBFFConstraints
AddAtomXConstraint(int a) OBFFConstraints
AddAtomYConstraint(int a) OBFFConstraints
AddAtomZConstraint(int a) OBFFConstraints
AddDistanceConstraint(int a, int b, double length) OBFFConstraints
AddIgnore(int a) OBFFConstraints
AddTorsionConstraint(int a, int b, int c, int d, double torsion) OBFFConstraints
Clear() OBFFConstraints
DeleteConstraint(int index) OBFFConstraints
GetConstraintAtomA(int index) const OBFFConstraints
GetConstraintAtomB(int index) const OBFFConstraints
GetConstraintAtomC(int index) const OBFFConstraints
GetConstraintAtomD(int index) const OBFFConstraints
GetConstraintEnergy() OBFFConstraints
GetConstraintType(int index) const OBFFConstraints
GetConstraintValue(int index) const OBFFConstraints
GetFactor() OBFFConstraints
GetGradient(int a) OBFFConstraints
GetIgnoredBitVec() OBFFConstraints [inline]
IsFixed(int a) OBFFConstraints
IsIgnored(int a) OBFFConstraints
IsXFixed(int a) OBFFConstraints
IsYFixed(int a) OBFFConstraints
IsZFixed(int a) OBFFConstraints
OBFFConstraints() OBFFConstraints
operator=(const OBFFConstraints &ai) OBFFConstraints [inline]
SetFactor(double factor) OBFFConstraints
Setup(OBMol &mol) OBFFConstraints
Size() const OBFFConstraints
~OBFFConstraints() OBFFConstraints [inline]

OBFFConstraints Member List 396


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

OpenBabel::OBFFConstraints

OBFFConstraints Member List 397


OBFFConstraints Class Reference
Internal class for OBForceField to handle constraints. More...

#include <openbabel/forcefield.h>

List of all members.

Public Member Functions


OBFFConstraints ()
~OBFFConstraints ()
void Clear ()
double GetConstraintEnergy ()
vector3 GetGradient (int a)
OBFFConstraints & operator= (const OBFFConstraints &ai)
void Setup (OBMol &mol)
Methods to set constraints
void SetFactor (double factor)
void AddIgnore (int a)
void AddAtomConstraint (int a)
void AddAtomXConstraint (int a)
void AddAtomYConstraint (int a)
void AddAtomZConstraint (int a)
void AddDistanceConstraint (int a, int b, double length)
void AddAngleConstraint (int a, int b, int c, double angle)
void AddTorsionConstraint (int a, int b, int c, int d, double torsion)
void DeleteConstraint (int index)
Methods to get information about set constraints
double GetFactor ()
int Size () const
int GetConstraintType (int index) const
double GetConstraintValue (int index) const
int GetConstraintAtomA (int index) const
int GetConstraintAtomB (int index) const
int GetConstraintAtomC (int index) const
int GetConstraintAtomD (int index) const
bool IsIgnored (int a)
bool IsFixed (int a)
bool IsXFixed (int a)
bool IsYFixed (int a)
bool IsZFixed (int a)
OBBitVec GetIgnoredBitVec ()

OBFFConstraints Class Reference 398


Open Babel: API Documentation

Detailed Description
Internal class for OBForceField to handle constraints.

Since:
version 2.2

Constructor & Destructor Documentation

OBFFConstraints ( )
Constructor.

~OBFFConstraints ( ) [inline]
Destructor.

Member Function Documentation

void Clear ( void )


Clear all constraints.

double GetConstraintEnergy ( )
Get the constraint energy.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::LineSearch(),
OBForceField::Newton2NumLineSearch(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

vector3 GetGradient ( int a )


Get the constraint gradient for atom with index a.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::MolecularDynamicsTakeNSteps(), and
OBForceField::SteepestDescentTakeNSteps().

const
OBFFConstraints& operator= ( OBFFConstraints ai ) [inline]
&
Get the constrain gradient for the atom.

void Setup ( OBMol & mol )

Detailed Description 399


Open Babel: API Documentation

Translate indices to OBAtom* objects, this function is called from OBForceField::Setup, this function doesn't
have to be called from anywhere else.

Referenced by OBForceField::SetConstraints(), and OBForceField::Setup().

void SetFactor ( double factor )


Set Constraint factor.

void AddIgnore ( int a )


Ignore the atom while setting up calculations.

void AddAtomConstraint ( int a )


Fix the position of an atom.

void AddAtomXConstraint ( int a )


Fix the x coordinate of the atom position.

void AddAtomYConstraint ( int a )


Fix the y coordinate of the atom position.

void AddAtomZConstraint ( int a )


Fix the z coordinate of the atom position.

void AddDistanceConstraint ( int a,


int b,
double length
)
Constrain the bond length a-b.

void AddAngleConstraint ( int a,


int b,
int c,
double angle
)
Constrain the angle a-b-c.

void AddTorsionConstraint ( int a,


int b,

Member Function Documentation 400


Open Babel: API Documentation

int c,
int d,
double torsion
)
Constrain the torsion angle a-b-c-d.

void DeleteConstraint ( int index )


Delete a constraint

index constraint index

double GetFactor ( )
Get Constraint factor.

int Size ( ) const

Returns:
the number of set constraints

Referenced by OBForceField::Setup().

int GetConstraintType ( int index ) const


The following constraint types are known: OBFF_CONST_IGNORE (ignore the atom while setting up
calculations, forcefield implementations need to check this value in their setup function),
OBFF_CONST_ATOM (fix atom position), OBFF_CONST_ATOM_X (fix x coordinate),
OBFF_CONST_ATOM_Y (fix y coordinate), OBFF_CONST_ATOM_Z (fix z coordinate),
OBFF_CONST_BOND (constrain bond length), OBFF_CONST_ANGLE (constrain angle),
OBFF_CONST_TORSION (constrain torsion angle)

Returns:
the constraint type

double GetConstraintValue ( int index ) const

Returns:
The constraint value, this can be a bond length, angle or torsion angle depending on the constraint
type.

int GetConstraintAtomA ( int index ) const

Returns:
The constraint atom a (or fixed atom)

Member Function Documentation 401


Open Babel: API Documentation

index constraint index

int GetConstraintAtomB ( int index ) const

Returns:
The constraint atom b

index constraint index

int GetConstraintAtomC ( int index ) const

Returns:
The constraint atom c

index constraint index

int GetConstraintAtomD ( int index ) const

Returns:
The constraint atom d

index constraint index

bool IsIgnored ( int a )

Returns:
true if this atom is ignored

a atom index

bool IsFixed ( int a )

Returns:
true if this atom is fixed

a atom index

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(),
OBForceField::MolecularDynamicsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().

bool IsXFixed ( int a )

Member Function Documentation 402


Open Babel: API Documentation

Returns:
true if the x coordinate for this atom is fixed

a atom index

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and
OBForceField::SteepestDescentTakeNSteps().

bool IsYFixed ( int a )

Returns:
true if the y coordinate for this atom is fixed

a atom index

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and
OBForceField::SteepestDescentTakeNSteps().

bool IsZFixed ( int a )

Returns:
true if the z coordinate for this atom is fixed

a atom index

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and
OBForceField::SteepestDescentTakeNSteps().

OBBitVec GetIgnoredBitVec ( ) [inline]

Returns:
the ignored atom indexes as bitvec. (used in OBForceField::Setup() to determine if a call to
OBForceField::SetupCalculations() is needed)

Referenced by OBForceField::SetConstraints(), and OBForceField::Setup().

The documentation for this class was generated from the following files:

• forcefield.h
• forcefield.cpp

Member Function Documentation 403


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 404


OBFFParameter Member List
This is the complete list of members for OBFFParameter, including all inherited members.

_a OBFFParameter
_b OBFFParameter
_c OBFFParameter
_d OBFFParameter
_dpar OBFFParameter
_ipar OBFFParameter
a OBFFParameter
b OBFFParameter
c OBFFParameter
clear() OBFFParameter [inline]
d OBFFParameter
operator=(const OBFFParameter &ai) OBFFParameter [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
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBFFParameter

OBFFParameter Member List 405


OBFFParameter Class Reference
Internal class for OBForceField to hold forcefield parameters. More...

#include <openbabel/forcefield.h>

List of all members.

Public Member Functions


OBFFParameter & operator= (const OBFFParameter &ai)
void clear ()

Public Attributes
int a
int b
int c
int d
std::string _a
std::string _b
std::string _c
std::string _d
std::vector< int > _ipar
std::vector< double > _dpar

Detailed Description
Internal class for OBForceField to hold forcefield parameters.

Member Function Documentation

const
OBFFParameter& operator= ( OBFFParameter ai ) [inline]
&
Assignment.

void clear ( ) [inline]


Reset the atom types and set all parameters to zero.

OBFFParameter Class Reference 406


Open Babel: API Documentation

Member Data Documentation

int a
Used to store integer atom types.

Referenced by OBFFParameter::operator=().

int b

Referenced by OBFFParameter::operator=().

int c

Referenced by OBFFParameter::operator=().

int d

Referenced by OBFFParameter::operator=().

std::string _a
used to store string atom types

Referenced by OBFFParameter::operator=().

std::string _b

Referenced by OBFFParameter::operator=().

std::string _c

Referenced by OBFFParameter::operator=().

std::string _d

Referenced by OBFFParameter::operator=().

std::vector<int> _ipar
Used to store integer type parameters (bondtypes, multiplicity, ...).

Member Data Documentation 407


Open Babel: API Documentation

Referenced by OBFFParameter::operator=().

std::vector<double> _dpar
Used to store double type parameters (force constants, bond lengths, angles, ...).

Referenced by OBFFParameter::operator=().

The documentation for this class was generated from the following file:

• forcefield.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:56 2008 by 1.5.6.

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

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

Member Data Documentation 408


OBFingerprint Member List
This is the complete list of members for OBFingerprint, including all inherited members.

_id OBPlugin [protected]


[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
[inline,
Begin(const char *PluginID) OBPlugin
static]
[inline,
DescribeBits(const std::vector< unsigned int > fp, bool bSet=true) OBFingerprint
virtual]
[inline,
Description() OBPlugin
virtual]
Display(std::string &txt, const char *param, const char
OBPlugin [virtual]
*ID=NULL)
[inline,
End(const char *PluginID) OBPlugin
static]
[inline,
FindFingerprint(const char *ID) OBFingerprint
static]
FirstLine(const char *txt) OBPlugin [static]
[inline,
Flags() OBFingerprint
virtual]
Fold(std::vector< unsigned int > &vec, unsigned int nbits) OBFingerprint
FPT_UNIQUEBITS enum value OBFingerprint
FptFlag enum name OBFingerprint
GetBit(const std::vector< unsigned int > &vec, const unsigned int
OBFingerprint
n)
[inline,
Getbitsperint() OBFingerprint
static]
GetFingerprint(OBBase *pOb, std::vector< unsigned int > &fp, int
OBFingerprint [pure virtual]
nbits=0)=0
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
List(const char *PluginID, const char *param=NULL, std::ostream
OBPlugin [static]
*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)
[inline,
MakeInstance(const std::vector< std::string > &) OBPlugin
virtual]

OBFingerprint Member List 409


Open Babel: API Documentation

PluginIterator typedef OBPlugin


[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
SetBit(std::vector< unsigned int > &vec, const unsigned int n) OBFingerprint
Tanimoto(const std::vector< unsigned int > &vec1, const
OBFingerprint [static]
std::vector< unsigned int > &vec2)
Tanimoto(const std::vector< unsigned int > &vec1, const unsigned [inline,
OBFingerprint
int *p2) static]
[inline,
~OBFingerprint() OBFingerprint
virtual]
[inline,
~OBPlugin() OBPlugin
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::OBFingerprint

OBFingerprint Member List 410


OBFingerprint Class Reference
The base class for fingerprints. More...

#include <openbabel/fingerprint.h>

Inheritance diagram for OBFingerprint:

[legend]

List of all members.

Public Types
enum FptFlag { FPT_UNIQUEBITS = 1 }
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


virtual ~OBFingerprint ()
void SetBit (std::vector< unsigned int > &vec, const unsigned int n)
bool GetBit (const std::vector< unsigned int > &vec, const unsigned int
n)
void Fold (std::vector< unsigned int > &vec, unsigned int nbits)
virtual bool GetFingerprint (OBBase *pOb, std::vector< unsigned int > &fp,
int nbits=0)=0
virtual unsigned int Flags ()
virtual std::string DescribeBits (const std::vector< unsigned int > fp, bool bSet=true)
virtual const char * Description ()
virtual bool Display (std::string &txt, const char *param, const char
*ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

OBFingerprint Class Reference 411


Open Babel: API Documentation

Static Public Member Functions


static double Tanimoto (const std::vector< unsigned int > &vec1, const
std::vector< unsigned int > &vec2)
static double Tanimoto (const std::vector< unsigned int > &vec1, const unsigned
int *p2)
static unsigned int Getbitsperint ()
static OBFingerprint * FindFingerprint (const char *ID)
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 PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
const char * _id

Classes
struct bit_or
Function object to set bits.

Detailed Description
The base class for fingerprints.

These fingerprints are condensed representation of molecules (or other objects) as a list of boolean values
(actually bits in a vector<unsigned>) with length of a power of 2. The main motivation is for fast searching of
data sources containing large numbers of molecules (up to several million). Open Babel provides some
routines which can search text files containing lists of molecules in any format. See the documentation on the
class FastSearch.

There are descriptions of molecular fingerprints at


http://www.daylight.com/dayhtml/doc/theory/theory.finger.html) and
http://www.mesaac.com/Fingerprint.htm
Many methods of preparing fingerprints have been described, but the type supported currently in OpenBabel
has each bit representing a substructure (or other molecular property). If a substructure is present in the

Static Public Member Functions 412


Open Babel: API Documentation
molecule, then a particular bit is set to 1. But because the hashing method may also map other substructures to
the same bit, a match does not guarantee that a particular substructure is present; there may be false positives.
However, with proper design, a large fraction of irrelevant molecules in a data set can be eliminated in a fast
search with boolean methods on the fingerprints. It then becomes feasible to make a definitive substructure
search by conventional methods on this reduced list even if it is slow.

OpenBabel provides a framework for applying new types of fingerprints without changing any existing code.
They are derived from OBFingerprint and the source file is just compiled with the rest of OpenBabel.
Alternatively, they can be separately compiled as a DLL or shared library and discovered when OpenBabel
runs.

For more on these specific implementations of fingerprints in Open Babel, please take a look at the
developer's wiki: http://openbabel.org/wiki/Fingerprints

Fingerprints derived from this abstract base class OBFingerprint can be for any object derived from OBBase
(not just for OBMol). Each derived class provides an ID as a string and OBFingerprint keeps a map of these to
provides a pointer to the class when requested in FindFingerprint.

-- To define a fingerprint type --

The classes derived form OBFingerprint are required to provide a GetFingerprint() routine and a Description()
routine

class MyFpType : OBFingerprint


{
MyFpType(const char* id) : OBFingerprint(id){};

virtual bool GetFingerprint(OBBase* pOb, vector<unsigned int>& fp, int nbits)


{
//Convert pOb to the required type, usually OBMol
OBMol* pmol = dynamic_cast<OBMol*>(pOb);
fp.resize(required_number_of_words);
...
use SetBit(fp,n); to set the nth bit

if(nbits)
Fold(fp, nbits);
}

virtual const char* Description(){ return "Some descriptive text";}


...
};

Declare a global instance with the ID you will use in -f options to specify its use.

MyFpType theMyFpType("myfpID");

-- To obtain a fingerprint --

OBMol mol;
...
vector<unsigned int> fp;
OBFingerprint::GetDefault()->GetFingerprint(&mol, fp); //gets default size of fingerprint

or

Detailed Description 413


Open Babel: API Documentation
vector<unsigned int> fp;
OBFingerPrint* pFP = OBFingerprint::FindFingerprint("myfpID");
...and maybe...
pFP->GetFingerprint(&mol,fp, 128); //fold down to 128bits if was originally larger

-- To print a list of available fingerprint types --

std::string id;
OBFingerPrint* pFPrt=NULL;
while(OBFingerprint::GetNextFPrt(id, pFPrt))
{
cout << id << " -- " << pFPrt->Description() << endl;
}

Fingerprints are handled as vector<unsigned int> so that the number of bits in this vector and their order will
be platform and compiler dependent, because of size of int types and endian differences. Use fingerprints (and
fastsearch indexes containing them) only for comparing with other fingerprints prepared on the same machine.

The FingerprintFormat class is an output format which displays fingerprints as hexadecimal. When multiple
molecules are supplied it will calculate the Tanimoto coefficient from the first molecule to each of the others.
It also shows whether the first molecule is a possible substructure to all the others, i.e. whether all the bits set
in the fingerprint for the first molecule are set in the fingerprint of the others. To display hexadecimal
information when multiple molecules are provided it is necessay to use the -xh option.

To see a list of available format types, type babel -F on the command line. The -xF option of the
FingerprintFormat class also provides this output, but due to a quirk in the way the program works, it is
necessary to have a valid input molecule for this option to work.

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Member Enumeration Documentation

enum FptFlag
Optional flags.

Enumerator:
FPT_UNIQUEBITS

Constructor & Destructor Documentation

[inline,
virtual ~OBFingerprint ( )
virtual]

-- To define a fingerprint type -- 414


Open Babel: API Documentation

Member Function Documentation

void SetBit ( std::vector< unsigned int > & vec,


const unsigned int n
)
Sets the nth bit.

bool GetBit ( const std::vector< unsigned int > & vec,


const unsigned int n
)
return true if the nth bit is set;

void Fold ( std::vector< unsigned int > & vec,


unsigned int nbits
)
Repeatedly ORs the top half with the bottom half until no smaller than nbits.

virtual bool GetFingerprint ( OBBase * pOb,


std::vector< unsigned int > & fp,
int nbits = 0
) [pure virtual]

Returns:
fingerprint in vector, which may be resized, folded to nbits (if nbits!=0)

Referenced by FastSearchIndexer::Add(), FastSearch::Find(), FastSearch::FindMatch(), and


FastSearch::FindSimilar().

virtual unsigned int Flags ( ) [inline, virtual]

virtual std::string DescribeBits ( const std::vector< unsigned int > fp,


bool bSet = true
[inline,
)
virtual]

Returns:
a description of each bit that is set (or unset, if bSet=false)

Since:

Constructor & Destructor Documentation 415


Open Babel: API Documentation

version 2.2

double Tanimoto ( const std::vector< unsigned int > & vec1,


const std::vector< unsigned int > & vec2
) [static]

Returns:
the Tanimoto coefficient between two vectors (vector<unsigned int>& SeekPositions)

static double Tanimoto ( const std::vector< unsigned int > & vec1,
const unsigned int * p2
[inline,
)
static]
Inline version of Tanimoto() taking a pointer for the second vector.

If used for two vectors, vec1 and vec2, call as Tanimoto(vec1, &vec2[0]);

static unsigned int Getbitsperint ( ) [inline, static]

Referenced by FastSearchIndexer::FastSearchIndexer(), FastSearch::Find(), FastSearch::FindMatch(),


FastSearch::FindSimilar(), OBFingerprint::Fold(), OBFingerprint::GetBit(), and OBFingerprint::SetBit().

[inline,
static OBFingerprint* FindFingerprint ( const char * ID )
static]
For backward compatibility; a synonym of OBFingerprint::FindType.

Returns:
a pointer to a fingerprint (the default if ID is empty), or NULL if not available

Referenced by FptIndex::CheckFP().

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().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]

Member Function Documentation 416


Open Babel: API Documentation

Write information on a plugin class to the string txt. Return false if not written. The default implementation
outputs: the ID, a tab character, and the first line of the Description. The param string can be used in derived
types to provide different outputs.

Reimplemented in OBDescriptor, and OBFormat.

Referenced by OBDescriptor::Display().

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.

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,

Member Function Documentation 417


Open Babel: API Documentation

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.

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().

Member Function Documentation 418


Open Babel: API Documentation

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 Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

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

Member Data Documentation 419


Open Babel: API Documentation

• Class Hierarchy
• Class Members

Member Data Documentation 420


OBFloatGrid Member List
This is the complete list of members for OBFloatGrid, including all inherited members.

_halfSpace OBFloatGrid [protected]


_inv_spa OBFloatGrid [protected]
_ival OBFloatGrid [protected]
_midx OBFloatGrid [protected]
_midy OBFloatGrid [protected]
_midz OBFloatGrid [protected]
_spacing OBFloatGrid [protected]
_values OBFloatGrid [protected]
_vdata OBBase [protected]
_xAxis OBFloatGrid [protected]
_xdim OBFloatGrid [protected]
_xmax OBGrid [protected]
_xmin OBGrid [protected]
_yAxis OBFloatGrid [protected]
_ydim OBFloatGrid [protected]
_ymax OBGrid [protected]
_ymin OBGrid [protected]
_zAxis OBFloatGrid [protected]
_zdim OBFloatGrid [protected]
_zmax OBGrid [protected]
_zmin OBGrid [protected]
BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
Center() OBFloatGrid [inline]
[inline,
ClassDescription() OBBase
static]
Clear() OBBase [virtual]
CloneData(OBGenericData *d) OBBase
CoordsToIndex(int *, double *) OBFloatGrid
CoordsToIndex(double x, double y, double z) OBFloatGrid
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]

OBFloatGrid Member List 421


Open Babel: API Documentation

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
GetDataVector() OBFloatGrid
GetDim(int *a) OBFloatGrid [inline]
GetHalfSpace() const OBFloatGrid [inline]
GetMax() OBFloatGrid [inline]
GetMax(double *a) OBFloatGrid [inline]
GetMidpointVector() OBFloatGrid [inline]
GetMin() OBFloatGrid [inline]
GetMin(double *a) OBFloatGrid [inline]
GetScale() const OBFloatGrid [inline]
GetSpacing() const OBFloatGrid [inline]
GetSpacing(double &s) OBFloatGrid [inline]
GetVals() OBFloatGrid [inline]
GetValue(int i, int j, int k) OBFloatGrid [inline]
GetXAxis() const OBFloatGrid [inline]
GetXdim() const OBFloatGrid [inline]
GetXmax() const OBGrid [inline]
GetXmin() const OBGrid [inline]
GetYAxis() const OBFloatGrid [inline]
GetYdim() const OBFloatGrid [inline]
GetYmax() const OBGrid [inline]
GetYmin() const OBGrid [inline]
GetZAxis() const OBFloatGrid [inline]
GetZdim() const OBFloatGrid [inline]
GetZmax() const OBGrid [inline]
GetZmin() const OBGrid [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
IndexToCoords(int idx, double &x, double &y, double &z) OBFloatGrid
Init(OBMol &box, double spacing, double pad=0.0) OBFloatGrid
OpenBabel::OBGrid::Init(OBMol &box) OBGrid [virtual]
Inject(double x, double y, double z) OBFloatGrid
Interpolate(double, double, double) OBFloatGrid
InterpolateDerivatives(double, double, double, double *derivatives) OBFloatGrid
OBFloatGrid() OBFloatGrid [inline]
OBGrid() OBGrid [inline]

OBFloatGrid Member List 422


Open Babel: API Documentation

operator<<(std::ostream &, const OBFloatGrid &) OBFloatGrid [friend]


operator>>(std::istream &, OBFloatGrid &) OBFloatGrid [friend]
PointIsInBox(double x, double y, double z) OBGrid [inline]
PointIsInBox(double *c) OBGrid [inline]
PointIsInBox(vector3 v) OBGrid [inline]
SetData(OBGenericData *d) OBBase [inline]
SetLimits(const vector3 &origin, const vector3 &x, const vector3 &y,
OBFloatGrid
const vector3 &z)
SetLimits(const double origin[3], const double x[3], const double y[3],
OBFloatGrid
const double z[3])
SetNumberOfPoints(int nx, int ny, int nz) OBFloatGrid
SetVals(const std::vector< double > &vals) OBFloatGrid
SetVals(double *ptr) OBFloatGrid [inline]
SetValue(int i, int j, int k, double val) OBFloatGrid [inline]
SetXAxis(vector3) OBFloatGrid
SetYAxis(vector3) OBFloatGrid
SetZAxis(vector3) OBFloatGrid
[inline,
~OBBase() OBBase
virtual]
~OBFloatGrid() OBFloatGrid [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

OBFloatGrid Member List 423


Open Babel: API Documentation

OpenBabel::OBFloatGrid

OBFloatGrid Member List 424


OBFloatGrid Class Reference
Handle double precision floating point 3D grids (e.g., charge density around an OBMol). More...

#include <openbabel/grid.h>

Inheritance diagram for OBFloatGrid:

[legend]

List of all members.

Public Member Functions


OBFloatGrid ()
~OBFloatGrid ()
void Init (OBMol &box, double spacing, double pad=0.0)
vector3 GetMin ()
void GetMin (double *a)
vector3 GetMax ()
void GetMax (double *a)
double GetSpacing () const
void GetSpacing (double &s)
double GetScale () const
double GetHalfSpace () const
int GetXdim () const
int GetYdim () const
int GetZdim () const
void GetDim (int *a)
vector3 GetMidpointVector ()
vector3 GetXAxis () const
vector3 GetYAxis () const
vector3 GetZAxis () const
void SetNumberOfPoints (int nx, int ny, int nz)
void SetXAxis (vector3)
void SetYAxis (vector3)
void SetZAxis (vector3)
void SetLimits (const vector3 &origin, const vector3 &x, const vector3 &y,
const vector3 &z)

OBFloatGrid Class Reference 425


Open Babel: API Documentation
void SetLimits (const double origin[3], const double x[3], const double y[3],
const double z[3])
std::vector< double > GetDataVector ()
void SetVals (const std::vector< double > &vals)
double * GetVals ()
double GetValue (int i, int j, int k)
void SetVals (double *ptr)
bool SetValue (int i, int j, int k, double val)
vector3 Center ()
double Inject (double x, double y, double z)
void IndexToCoords (int idx, double &x, double &y, double &z)
void CoordsToIndex (int *, double *)
int CoordsToIndex (double x, double y, double z)
double Interpolate (double, double, double)
double InterpolateDerivatives (double, double, double, double *derivatives)
virtual void Init (OBMol &box)
double GetXmin () const
double GetYmin () const
double GetZmin () const
double GetXmax () const
double GetYmax () const
double GetZmax () const
bool PointIsInBox (double x, double y, double z)
bool PointIsInBox (double *c)
bool PointIsInBox (vector3 v)
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 * > & GetData ()
std::vector< OBGenericData * > GetData (DataOrigin source)
std::vector< OBGenericData * > GetAllData (const unsigned int type)
OBDataIterator BeginData ()
OBDataIterator EndData ()

Public Member Functions 426


Open Babel: API Documentation

Static Public Member Functions


static const char * ClassDescription ()

Protected Attributes
std::vector< double > _values
int * _ival
double _midz
double _midx
double _midy
int _ydim
int _xdim
int _zdim
double _spacing
double _inv_spa
double _halfSpace
vector3 _xAxis
vector3 _yAxis
vector3 _zAxis
double _xmin
double _xmax
double _ymin
double _ymax
double _zmin
double _zmax
std::vector< OBGenericData * > _vdata

Friends
std::ostream & operator<< (std::ostream &, const OBFloatGrid &)
std::istream & operator>> (std::istream &, OBFloatGrid &)

Detailed Description
Handle double precision floating point 3D grids (e.g., charge density around an OBMol).

Supports input/output and base functionality for simple 3D discrete grids of some function -- typically around
a molecule. Typically you will want to use OBGridData which uses OBFloatGrid to store its data.

See also:
OBGridData

Constructor & Destructor Documentation

OBFloatGrid ( ) [inline]

Static Public Member Functions 427


Open Babel: API Documentation

~OBFloatGrid ( ) [inline]

Member Function Documentation

void Init ( OBMol & box,


double spacing,
double pad = 0.0
)
Initialize the grid using this molecule as a box (plus a padding) with the supplied spacing between points.

Referenced by OBForceField::GetGrid().

vector3 GetMin ( ) [inline]

Returns:
the minimum point in the grid.

Referenced by OBForceField::GetGrid().

void GetMin ( double * a ) [inline]


Get the minimum point in the grid.

Deprecated:
Will be removed. Use

See also:
GetMin()

vector3 GetMax ( ) [inline]

Returns:
the minimum point in the grid.

void GetMax ( double * a ) [inline]


Get the maximum point in the grid.

Deprecated:
Will be removed.

See also:
GetMax()

Constructor & Destructor Documentation 428


Open Babel: API Documentation

const
double GetSpacing ( )
[inline]

Returns:
The grid spacing.

double
void GetSpacing ( s ) [inline]
&
Get the grid spacing.

Deprecated:
Will be removed.

See also:
GetSpacing()

double GetScale ( ) const [inline]

Returns:
Inverse of the grid spacing.

const
double GetHalfSpace ( )
[inline]

Returns:
Half of the spacing between grid points.

int GetXdim ( ) const [inline]

Returns:
Size of the grid in the x dimension.

Referenced by OBForceField::GetGrid().

int GetYdim ( ) const [inline]

Returns:
Size of the grid in the y dimension.

Referenced by OBForceField::GetGrid().

int GetZdim ( ) const [inline]

Member Function Documentation 429


Open Babel: API Documentation

Returns:
Size of the grid in the z dimension.

Referenced by OBForceField::GetGrid().

int
void GetDim ( a ) [inline]
*
Get the x, y and z dimensions (must pass an double[3] at least).

Deprecated:
May be removed in future.

See also:
GetXdim()

GetYdim()

GetZdim()

vector3 GetMidpointVector ( ) [inline]

Returns:
Position of the center of the grid.

vector3 GetXAxis ( ) const [inline]

Returns:
X axis direction.

vector3 GetYAxis ( ) const [inline]

Returns:
Y axis direction.

vector3 GetZAxis ( ) const [inline]

Returns:
Z axis direction.

void SetNumberOfPoints ( int nx,


int ny,
int nz
)

Member Function Documentation 430


Open Babel: API Documentation

Sets the number of points in the x, y and z directions.

void SetXAxis ( vector3 v )


Set the direction of the x axis.

Referenced by OBFloatGrid::SetLimits().

void SetYAxis ( vector3 v )


Set the direction of the y axis.

Referenced by OBFloatGrid::SetLimits().

void SetZAxis ( vector3 v )


Set the direction of the z axis.

Referenced by OBFloatGrid::SetLimits().

void SetLimits ( const vector3 & origin,


const vector3 & x,
const vector3 & y,
const vector3 & z
)
Set the limits (i.e., the origin point and the axes) NOTE: You must set the number of points first, with
SetNumberOfPoints so the grid spacing can be calculated

Referenced by OBFloatGrid::SetLimits().

void SetLimits ( const double origin[3],


const double x[3],
const double y[3],
const double z[3]
)

Deprecated:
Will be removed.

See also:
SetLimits(const vector3& origin, const vector3& x, const vector3& y, const vector3& z)

std::vector< double > GetDataVector ( )


Get a copy of the vector that stores the points in the grid.

Member Function Documentation 431


Open Babel: API Documentation

void SetVals ( const std::vector< double > & vals )


Set the values in the grid to those in the vector passed. Note that the vector must be of the same dimensions as
the grid based on the values given in SetNumberOfPoints(int nx, int ny, int nz).

double* GetVals ( ) [inline]

Returns:
Pointer to the first element of the grid point data stored as a one dimensional array.

Deprecated:
Will be removed.

See also:
GetDataVector()

double GetValue ( int i,


int j,
int k
) [inline]

Returns:
Value at the point in the grid specified by i, j and k.

void SetVals ( double * ptr ) [inline]

Deprecated:
Will be removed.

See also:
SetVals(const std::vector<double> & vals)

bool SetValue ( int i,


int j,
int k,
double val
) [inline]
Set the value at the grid point specified by i, j and k to val.

vector3 Center ( ) [inline]

Returns:
Position of the center of the grid.

Member Function Documentation 432


Open Babel: API Documentation

double Inject ( double x,


double y,
double z
)

Returns:
the value at the given point (rounding as needed)

void IndexToCoords ( int idx,


double
x,
&
double
y,
&
double
z
&
)

void CoordsToIndex ( int * idx,


double * c
)

Referenced by OBFloatGrid::Inject().

int CoordsToIndex ( double x,


double y,
double z
)

double Interpolate ( double x,


double y,
double z
)

Returns:
the interpolated value for the given point

double InterpolateDerivatives ( double x,


double y,
double z,
double * derivatives

Member Function Documentation 433


Open Babel: API Documentation

Returns:
the interpolated value for the given point and set the dx, dy, dz derivatives

void Init ( OBMol & box ) [virtual, inherited]


Initialize the grid based on a box around the molecule box Subclasses should overload this method -- this
only tracks the dimension of the box itself.

Referenced by OBFloatGrid::Init(), and OBProxGrid::Setup().

const [inline,
double GetXmin ( )
inherited]

Returns:
the minimum x point of the grid

const [inline,
double GetYmin ( )
inherited]

Returns:
the minimum y point of the grid

double GetZmin ( ) const [inline, inherited]

Returns:
the minimum z point of the grid

double GetXmax ( ) const [inline, inherited]

Returns:
the maximum x point of the grid

double GetYmax ( ) const [inline, inherited]

Returns:
the maximum y point of the grid

double GetZmax ( ) const [inline, inherited]

Returns:
the maximum z point of the grid

Member Function Documentation 434


Open Babel: API Documentation

bool PointIsInBox ( double x,


double y,
double z
) [inline, inherited]

Returns:
whether the supplied XYZ coordinates fall within the box

Referenced by OBProxGrid::Setup().

bool PointIsInBox ( double * c ) [inline, inherited]

Returns:
true if the point falls within the box

bool PointIsInBox ( vector3 v ) [inline, inherited]

Returns:
true if the point falls within the box

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.

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.

Member Function Documentation 435


Open Babel: API Documentation

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

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]

Member Function Documentation 436


Open Babel: API Documentation

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:
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]
&

Member Function Documentation 437


Open Babel: API Documentation

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

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=().

Member Function Documentation 438


Open Babel: API Documentation

[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=().

Friends And Related Function Documentation

std::ostream
std::ostream& operator<< ( os,
&
const
OBFloatGrid fg
&
) [friend]

std::istream
std::istream& operator>> ( is,
&
OBFloatGrid
fg
&
) [friend]

Member Data Documentation

std::vector<double> _values [protected]


floating point values

Referenced by OBFloatGrid::GetDataVector(), OBFloatGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetNumberOfPoints(), and OBFloatGrid::SetVals().

int* _ival [protected]


for integer values (deprecated)

Referenced by OBFloatGrid::Init().

double _midz [protected]

Referenced by OBFloatGrid::Init(), OpenBabel::operator<<(), and OpenBabel::operator>>().

Friends And Related Function Documentation 439


Open Babel: API Documentation

double _midx [protected]

Referenced by OBFloatGrid::Init(), OpenBabel::operator<<(), and OpenBabel::operator>>().

double _midy [protected]


center of grid in world coordinates

Referenced by OBFloatGrid::Init(), OpenBabel::operator<<(), and OpenBabel::operator>>().

int _ydim [protected]

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), OBFloatGrid::SetNumberOfPoints(), and
OBFloatGrid::SetVals().

int _xdim [protected]

Referenced by OBFloatGrid::Init(), OBFloatGrid::Interpolate(), OpenBabel::operator<<(),


OpenBabel::operator>>(), OBFloatGrid::SetLimits(), OBFloatGrid::SetNumberOfPoints(), and
OBFloatGrid::SetVals().

int _zdim [protected]


grid dimensions

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), OBFloatGrid::SetNumberOfPoints(), and
OBFloatGrid::SetVals().

double _spacing [protected]

Referenced by OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OpenBabel::operator<<(),


OpenBabel::operator>>(), and OBFloatGrid::SetLimits().

double _inv_spa [protected]


spacing between grid points and its inverse

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::Init(), OBFloatGrid::Interpolate(),


OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(), and
OBFloatGrid::SetLimits().

Member Data Documentation 440


Open Babel: API Documentation

double _halfSpace [protected]


half of the grid spacing

Referenced by OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBFloatGrid::Interpolate(),


OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator>>(), and OBFloatGrid::SetLimits().

vector3 _xAxis [protected]


Three axes (i.e., translation vectors like a unit cell).

Referenced by OBFloatGrid::SetXAxis().

vector3 _yAxis [protected]

Referenced by OBFloatGrid::SetYAxis().

vector3 _zAxis [protected]

Referenced by OBFloatGrid::SetZAxis().

double _xmin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _xmax [protected, inherited]

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymax [protected, inherited]

Member Data Documentation 441


Open Babel: API Documentation

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmax [protected, inherited]


the min/max axes in XYZ axes (i.e., the box)

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

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:

• grid.h
• grid.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

Member Data Documentation 442


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

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

Member Data Documentation 443


OBForceField Member List
This is the complete list of members for OBForceField, including all inherited members.

[protected,
_constraints OBForceField
static]
_cstep OBForceField [protected]
_current_conformer OBForceField [protected]
_cutoff OBForceField [protected]
_e_n1 OBForceField [protected]
_econv OBForceField [protected]
_elepairs OBForceField [protected]
_energies OBForceField [protected]
[protected,
_fixAtom OBForceField
static]
_grad1 OBForceField [protected]
_gradientPtr OBForceField [protected]
_id OBPlugin [protected]
[protected,
_ignoreAtom OBForceField
static]
_init OBForceField [protected]
_interGroup OBForceField [protected]
_interGroups OBForceField [protected]
_intraGroup OBForceField [protected]
_linesearch OBForceField [protected]
_logbuf OBForceField [protected]
_loglvl OBForceField [protected]
_logos OBForceField [protected]
_mol OBForceField [protected]
_ncoords OBForceField [protected]
_nsteps OBForceField [protected]
_origLogLevel OBForceField [protected]
_pairfreq OBForceField [protected]
_parFile OBForceField [protected]
_rele OBForceField [protected]
_rvdw OBForceField [protected]
_temp OBForceField [protected]
_timestep OBForceField [protected]
_validSetup OBForceField [protected]
_vdwpairs OBForceField [protected]
_velocityPtr OBForceField [protected]
AddGradient(double *grad, int idx) OBForceField [inline,

OBForceField Member List 444


Open Babel: API Documentation

protected]
AddInterGroup(OBBitVec &group) OBForceField
AddInterGroups(OBBitVec &group1, OBBitVec &group2) OBForceField
AddIntraGroup(OBBitVec &group) OBForceField
[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
[inline,
Begin(const char *PluginID) OBPlugin
static]
[inline,
ClearGradients() OBForceField protected,
virtual]
ClearGroups() OBForceField
ConjugateGradients(int steps, double econv=1e-6f, int
OBForceField
method=OBFF_ANALYTICAL_GRADIENT)
ConjugateGradientsInitialize(int steps=1000, double econv=1e-6f, int
OBForceField
method=OBFF_ANALYTICAL_GRADIENT)
ConjugateGradientsTakeNSteps(int n) OBForceField
CorrectVelocities() OBForceField
[inline,
Description() OBPlugin
virtual]
DetectExplosion() OBForceField
Display(std::string &txt, const char *param, const char *ID=NULL) OBPlugin [virtual]
DistanceGeometry() OBForceField
[inline,
E_Angle(bool=true) OBForceField
virtual]
[inline,
E_Bond(bool=true) OBForceField
virtual]
[inline,
E_Electrostatic(bool=true) OBForceField
virtual]
[inline,
E_OOP(bool=true) OBForceField
virtual]
[inline,
E_StrBnd(bool=true) OBForceField
virtual]
[inline,
E_Torsion(bool=true) OBForceField
virtual]
[inline,
E_VDW(bool=true) OBForceField
virtual]
EnableAllPairs() OBForceField [inline]
EnableCutOff(bool enable) OBForceField [inline]
[inline,
End(const char *PluginID) OBPlugin
static]
[inline,
Energy(bool=true) OBForceField
virtual]
FindForceField(const std::string &ID) OBForceField

OBForceField Member List 445


Open Babel: API Documentation

[inline,
static]
[inline,
FindForceField(const char *ID) OBForceField
static]
FirstLine(const char *txt) OBPlugin [static]
GenerateVelocities() OBForceField
GetAtomTypes(OBMol &mol) OBForceField
GetConformers(OBMol &mol) OBForceField
GetConstraints() OBForceField
GetCoordinates(OBMol &mol) OBForceField
GetElectrostaticCutOff() OBForceField [inline]
[inline,
GetGradient(OBAtom *a, int=OBFF_ENERGY) OBForceField protected,
virtual]
[inline,
GetGradientPtr() OBForceField
protected]
GetGrid(double step, double padding, const char *type, double pchg) OBForceField
GetID() const OBPlugin [inline]
GetLineSearchType() OBForceField [inline]
GetLogLevel() OBForceField [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetNumPairs() OBForceField
GetParameter(int a, int b, int c, int d, std::vector< OBFFParameter >
OBForceField [protected]
&parameter)
GetParameter(const char *a, const char *b, const char *c, const char
OBForceField [protected]
*d, std::vector< OBFFParameter > &parameter)
GetParameterIdx(int a, int b, int c, int d, std::vector< OBFFParameter
OBForceField [protected]
> &parameter)
GetPartialCharges(OBMol &mol) OBForceField
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
[inline,
GetUnit() OBForceField
virtual]
GetUpdateFrequency() OBForceField [inline]
GetVDWCutOff() OBForceField [inline]
[inline,
HasAnalyticalGradients() OBForceField
virtual]
HasGroups() OBForceField
IgnoreCalculation(int a, int b) OBForceField [static]
IgnoreCalculation(int a, int b, int c) OBForceField [static]
IgnoreCalculation(int a, int b, int c, int d) OBForceField [static]
IsCutOffEnabled() OBForceField [inline]

OBForceField Member List 446


Open Babel: API Documentation

IsInSameRing(OBAtom *a, OBAtom *b) OBForceField [protected]


IsSetupNeeded(OBMol &mol) OBForceField
LineSearch(OBAtom *atom, vector3 &direction) OBForceField
LineSearch(double *currentCoords, double *direction) OBForceField
LineSearchTakeStep(double *origCoords, double *direction, double
OBForceField
step)
List(const char *PluginID, const char *param=NULL, std::ostream
OBPlugin [static]
*os=&std::cout)
ListAsString(const char *PluginID, const char *param=NULL) OBPlugin [static]
ListAsVector(const char *PluginID, const char *param, std::vector<
OBPlugin [static]
std::string > &vlist)
[inline,
MakeInstance(const std::vector< std::string > &) OBPlugin
virtual]
MakeNewInstance()=0 OBForceField [pure virtual]
MolecularDynamicsTakeNSteps(int n, double T, double
OBForceField
timestep=0.001, int method=OBFF_ANALYTICAL_GRADIENT)
Newton2NumLineSearch(double *direction) OBForceField
NumericalDerivative(OBAtom *a, int terms=OBFF_ENERGY) OBForceField [protected]
NumericalSecondDerivative(OBAtom *a, int
OBForceField [protected]
terms=OBFF_ENERGY)
OBFFLog(std::string msg) OBForceField [inline]
OBFFLog(const char *msg) OBForceField [inline]
[inline,
ParseParamFile() OBForceField
virtual]
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
PrintFormalCharges() OBForceField
PrintPartialCharges() OBForceField
PrintTypes() OBForceField
[inline,
PrintVector(double *i) OBForceField
static]
PrintVelocities() OBForceField
RandomRotorSearch(unsigned int conformers, unsigned int
OBForceField
geomSteps=2500)
RandomRotorSearchInitialize(unsigned int conformers, unsigned int
OBForceField
geomSteps=2500)
RandomRotorSearchNextConformer(unsigned int geomSteps=2500) OBForceField
SetConformers(OBMol &mol) OBForceField
SetConstraints(OBFFConstraints &constraints) OBForceField
SetCoordinates(OBMol &mol) OBForceField
SetElectrostaticCutOff(double r) OBForceField [inline]

OBForceField Member List 447


Open Babel: API Documentation

SetFixAtom(int index) OBForceField


[inline,
SetFormalCharges() OBForceField
virtual]
[inline,
SetGradient(double *grad, int idx) OBForceField
protected]
SetIgnoreAtom(int index) OBForceField
SetLineSearchType(int type) OBForceField [inline]
SetLogFile(std::ostream *pos) OBForceField
SetLogLevel(int level) OBForceField
SetParameterFile(const std::string &filename) OBForceField [inline]
[inline,
SetPartialCharges() OBForceField
virtual]
[inline,
SetTypes() OBForceField
virtual]
Setup(OBMol &mol) OBForceField
Setup(OBMol &mol, OBFFConstraints &constraints) OBForceField
[inline,
SetupCalculations() OBForceField
virtual]
SetUpdateFrequency(int f) OBForceField [inline]
[inline,
SetupPointers() OBForceField
virtual]
SetVDWCutOff(double r) OBForceField [inline]
SteepestDescent(int steps, double econv=1e-6f, int
OBForceField
method=OBFF_ANALYTICAL_GRADIENT)
SteepestDescentInitialize(int steps=1000, double econv=1e-6f, int
OBForceField
method=OBFF_ANALYTICAL_GRADIENT)
SteepestDescentTakeNSteps(int n) OBForceField
SystematicRotorSearch(unsigned int geomSteps=2500) OBForceField
SystematicRotorSearchInitialize(unsigned int geomSteps=2500) OBForceField
SystematicRotorSearchNextConformer(unsigned int geomSteps=2500) OBForceField
TypeID() OBForceField [inline]
UnsetFixAtom() OBForceField
UnsetIgnoreAtom() OBForceField
UpdateConformers(OBMol &mol) OBForceField [inline]
UpdateCoordinates(OBMol &mol) OBForceField [inline]
UpdatePairsSimple() OBForceField
[inline,
Validate() OBForceField
virtual]
ValidateConjugateGradients(int steps) OBForceField
ValidateGradientError(vector3 &numgrad, vector3 &anagrad) OBForceField
[inline,
ValidateGradients() OBForceField
virtual]
ValidateLineSearch(OBAtom *atom, vector3 &direction) OBForceField

OBForceField Member List 448


Open Babel: API Documentation

ValidateSteepestDescent(int steps) OBForceField


[inline,
VectorAdd(double *i, double *j, double *result) OBForceField
static]
VectorAngle(double *i, double *j, double *k) OBForceField [static]
VectorAngleDerivative(double *pos_a, double *pos_b, double *pos_c,
OBForceField [static]
double *force_a, double *force_b, double *force_c)
VectorAngleDerivative(vector3 &a, vector3 &b, vector3 &c) OBForceField [static]
VectorBondDerivative(double *pos_a, double *pos_b, double
OBForceField [static]
*force_a, double *force_b)
[inline,
VectorClear(double *i) OBForceField
static]
[inline,
VectorCopy(double *from, double *to) OBForceField
static]
[inline,
VectorCross(double *i, double *j, double *result) OBForceField
static]
[inline,
VectorDistance(double *pos_i, double *pos_j) OBForceField
static]
VectorDistanceDerivative(const double *const pos_i, const double
OBForceField [static]
*const pos_j, double *force_i, double *force_j)
[inline,
VectorDivide(double *i, double n, double *result) OBForceField
static]
[inline,
VectorDot(double *i, double *j) OBForceField
static]
[inline,
VectorLength(double *i) OBForceField
static]
VectorLengthDerivative(vector3 &a, vector3 &b) OBForceField [static]
[inline,
VectorMultiply(double *i, double n, double *result) OBForceField
static]
[inline,
VectorMultiply(const double *const i, const double n, double *result) OBForceField
static]
[inline,
VectorNormalize(double *i) OBForceField
static]
VectorOOP(double *i, double *j, double *k, double *l) OBForceField [static]
VectorOOPDerivative(double *pos_a, double *pos_b, double *pos_c,
double *pos_d, double *force_a, double *force_b, double *force_c, OBForceField [static]
double *force_d)
VectorOOPDerivative(vector3 &a, vector3 &b, vector3 &c, vector3
OBForceField [static]
&d)
[inline,
VectorSelfMultiply(double *i, double n) OBForceField
static]
[inline,
VectorSubtract(double *i, double *j, double *result) OBForceField
static]
VectorSubtract(const double *const i, const double *const j, double [inline,
OBForceField
*result) static]
VectorTorsion(double *i, double *j, double *k, double *l) OBForceField [static]

OBForceField Member List 449


Open Babel: API Documentation

VectorTorsionDerivative(double *pos_a, double *pos_b, double


*pos_c, double *pos_d, double *force_a, double *force_b, double OBForceField [static]
*force_c, double *force_d)
VectorTorsionDerivative(vector3 &a, vector3 &b, vector3 &c, vector3
OBForceField [static]
&d)
WeightedRotorSearch(unsigned int conformers, unsigned int
OBForceField
geomSteps)
[inline,
~OBForceField() OBForceField
virtual]
[inline,
~OBPlugin() OBPlugin
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::OBForceField

OBForceField Member List 450


OBForceField Class Reference
Base class for molecular mechanics force fields. More...

#include <openbabel/forcefield.h>

Inheritance diagram for OBForceField:

[legend]

List of all members.

Methods for constraints


OBFFConstraints & GetConstraints ()
void SetConstraints (OBFFConstraints &constraints)
void SetFixAtom (int index)
void UnsetFixAtom ()
void SetIgnoreAtom (int index)
void UnsetIgnoreAtom ()
static bool IgnoreCalculation (int a, int b)
static bool IgnoreCalculation (int a, int b, int c)
static bool IgnoreCalculation (int a, int b, int c, int d)

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


virtual OBForceField * MakeNewInstance ()=0
virtual ~OBForceField ()
const char * TypeID ()
void SetParameterFile (const std::string &filename)
virtual std::string GetUnit ()
virtual bool HasAnalyticalGradients ()
bool Setup (OBMol &mol)
bool Setup (OBMol &mol, OBFFConstraints &constraints)
virtual bool ParseParamFile ()

OBForceField Class Reference 451


Open Babel: API Documentation
virtual bool SetTypes ()
virtual bool SetFormalCharges ()
virtual bool SetPartialCharges ()
virtual bool SetupCalculations ()
virtual bool SetupPointers ()
bool IsSetupNeeded (OBMol &mol)
bool GetAtomTypes (OBMol &mol)
bool GetPartialCharges (OBMol &mol)
bool GetCoordinates (OBMol &mol)
bool UpdateCoordinates (OBMol &mol)
bool GetConformers (OBMol &mol)
bool UpdateConformers (OBMol &mol)
bool SetCoordinates (OBMol &mol)
bool SetConformers (OBMol &mol)
OBGridData * GetGrid (double step, double padding, const char *type, double pchg)
virtual const char * Description ()
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0
Methods for specifying interaction groups
void AddIntraGroup (OBBitVec &group)
void AddInterGroup (OBBitVec &group)
void AddInterGroups (OBBitVec &group1, OBBitVec &group2)
void ClearGroups ()
bool HasGroups ()
Methods for Cut-off distances
void EnableCutOff (bool enable)
bool IsCutOffEnabled ()
void SetVDWCutOff (double r)
double GetVDWCutOff ()
void SetElectrostaticCutOff (double r)
double GetElectrostaticCutOff ()
void SetUpdateFrequency (int f)
int GetUpdateFrequency ()
void UpdatePairsSimple ()
unsigned int GetNumPairs ()
void EnableAllPairs ()
Methods for energy evaluation
virtual double Energy (bool=true)
virtual double E_Bond (bool=true)
virtual double E_Angle (bool=true)
virtual double E_StrBnd (bool=true)
virtual double E_Torsion (bool=true)
virtual double E_OOP (bool=true)
virtual double E_VDW (bool=true)
virtual double E_Electrostatic (bool=true)
Methods for logging
void PrintTypes ()
void PrintFormalCharges ()
void PrintPartialCharges ()

Public Member Functions 452


Open Babel: API Documentation
void PrintVelocities ()
bool SetLogFile (std::ostream *pos)
bool SetLogLevel (int level)
int GetLogLevel ()
void OBFFLog (std::string msg)
void OBFFLog (const char *msg)
Methods for structure generation
void DistanceGeometry ()
void SystematicRotorSearch (unsigned int geomSteps=2500)
int SystematicRotorSearchInitialize (unsigned int geomSteps=2500)
bool SystematicRotorSearchNextConformer (unsigned int geomSteps=2500)
void RandomRotorSearch (unsigned int conformers, unsigned int
geomSteps=2500)
void RandomRotorSearchInitialize (unsigned int conformers, unsigned int
geomSteps=2500)
bool RandomRotorSearchNextConformer (unsigned int geomSteps=2500)
void WeightedRotorSearch (unsigned int conformers, unsigned int geomSteps)
Methods for energy minimization
void SetLineSearchType (int type)
int GetLineSearchType ()
vector3 LineSearch (OBAtom *atom, vector3 &direction)
double LineSearch (double *currentCoords, double *direction)
double Newton2NumLineSearch (double *direction)
void LineSearchTakeStep (double *origCoords, double *direction, double step)
void SteepestDescent (int steps, double econv=1e-6f, int
method=OBFF_ANALYTICAL_GRADIENT)
void SteepestDescentInitialize (int steps=1000, double econv=1e-6f, int
method=OBFF_ANALYTICAL_GRADIENT)
bool SteepestDescentTakeNSteps (int n)
void ConjugateGradients (int steps, double econv=1e-6f, int
method=OBFF_ANALYTICAL_GRADIENT)
void ConjugateGradientsInitialize (int steps=1000, double econv=1e-6f, int
method=OBFF_ANALYTICAL_GRADIENT)
bool ConjugateGradientsTakeNSteps (int n)
Methods for molecular dynamics
void GenerateVelocities ()
void CorrectVelocities ()
void MolecularDynamicsTakeNSteps (int n, double T, double timestep=0.001, int
method=OBFF_ANALYTICAL_GRADIENT)
Methods for forcefield validation
bool DetectExplosion ()
vector3 ValidateLineSearch (OBAtom *atom, vector3 &direction)
void ValidateSteepestDescent (int steps)
void ValidateConjugateGradients (int steps)
virtual bool Validate ()
virtual bool ValidateGradients ()
vector3 ValidateGradientError (vector3 &numgrad, vector3 &anagrad)

Public Member Functions 453


Open Babel: API Documentation

Static Public Member Functions


static OBForceField * FindForceField (const std::string &ID)
static OBForceField * FindForceField (const char *ID)
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)
Methods for vector analysis (used by OBFFXXXXCalculationYYYY)
static double VectorBondDerivative (double *pos_a, double *pos_b, double *force_a,
double *force_b)
static double VectorDistanceDerivative (const double *const pos_i, const double *const
pos_j, double *force_i, double *force_j)
static double VectorLengthDerivative (vector3 &a, vector3 &b)
static double VectorAngleDerivative (double *pos_a, double *pos_b, double *pos_c,
double *force_a, double *force_b, double *force_c)
static double VectorAngleDerivative (vector3 &a, vector3 &b, vector3 &c)
static double VectorOOPDerivative (double *pos_a, double *pos_b, double *pos_c,
double *pos_d, double *force_a, double *force_b, double *force_c, double
*force_d)
static double VectorOOPDerivative (vector3 &a, vector3 &b, vector3 &c, vector3 &d)
static double VectorTorsionDerivative (double *pos_a, double *pos_b, double *pos_c,
double *pos_d, double *force_a, double *force_b, double *force_c, double
*force_d)
static double VectorTorsionDerivative (vector3 &a, vector3 &b, vector3 &c, vector3 &d)
static void VectorSubtract (double *i, double *j, double *result)
static void VectorSubtract (const double *const i, const double *const j, double *result)
static void VectorAdd (double *i, double *j, double *result)
static void VectorDivide (double *i, double n, double *result)
static void VectorMultiply (double *i, double n, double *result)
static void VectorMultiply (const double *const i, const double n, double *result)
static void VectorSelfMultiply (double *i, double n)
static void VectorNormalize (double *i)
static void VectorCopy (double *from, double *to)
static double VectorLength (double *i)
static double VectorDistance (double *pos_i, double *pos_j)
static double VectorAngle (double *i, double *j, double *k)
static double VectorTorsion (double *i, double *j, double *k, double *l)
static double VectorOOP (double *i, double *j, double *k, double *l)
static void VectorClear (double *i)
static double VectorDot (double *i, double *j)
static void VectorCross (double *i, double *j, double *result)
static void PrintVector (double *i)

Static Public Member Functions 454


Open Babel: API Documentation

Protected Member Functions


OBFFParameter * GetParameter (int a, int b, int c, int d, std::vector< OBFFParameter >
&parameter)
OBFFParameter * GetParameter (const char *a, const char *b, const char *c, const char *d,
std::vector< OBFFParameter > &parameter)
int GetParameterIdx (int a, int b, int c, int d, std::vector< OBFFParameter >
&parameter)
vector3 NumericalDerivative (OBAtom *a, int terms=OBFF_ENERGY)
vector3 NumericalSecondDerivative (OBAtom *a, int terms=OBFF_ENERGY)
void SetGradient (double *grad, int idx)
void AddGradient (double *grad, int idx)
virtual vector3 GetGradient (OBAtom *a, int=OBFF_ENERGY)
double * GetGradientPtr ()
virtual void ClearGradients ()
bool IsInSameRing (OBAtom *a, OBAtom *b)

Static Protected Member Functions


static PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
OBMol _mol
bool _init
std::string _parFile
bool _validSetup
double * _gradientPtr
std::ostream * _logos
char _logbuf [BUFF_SIZE+1]
int _loglvl
int _origLogLevel
int _current_conformer
std::vector< double > _energies
double _econv
double _e_n1
int _cstep
int _nsteps
double * _grad1
unsigned int _ncoords
int _linesearch
double _timestep
double _temp
double * _velocityPtr
bool _cutoff
double _rvdw
double _rele
OBBitVec _vdwpairs

Protected Member Functions 455


Open Babel: API Documentation
OBBitVec _elepairs
int _pairfreq
std::vector< OBBitVec > _intraGroup
std::vector< OBBitVec > _interGroup
std::vector< std::pair
< OBBitVec, OBBitVec > > _interGroups
const char * _id

Static Protected Attributes


static OBFFConstraints _constraints = OBFFConstraints()
static int _fixAtom = 0
static int _ignoreAtom = 0

Detailed Description
Base class for molecular mechanics force fields.

The OBForceField class is the base class for molecular mechanics in Open Babel. Classes derived from the
OBForceField implement specific force fields (Ghemical, MMFF94, UFF, ...).Other classes such as
OBFFParameter, OBFFConstraint, OBFFCalculation and its derived classes are only for internal use. As a
user interested in using the available force fields in Open Babel, you don't need these classes. The rest of this
short introduction is aimed at these users. For information on how to implement additional force fields, see the
wiki pages or post your questions to the openbabel-devel mailing list.

Before we can start using a force field, we must first select it and set it up. This is illustrated in the first
example below. The Setup procedure assigns atom types, charges and parameters. There are several reasons
why this may fail, a log message will be written to the logfile before Setup() returns false.

The force field classes use their own logging functions. You can set the logfile using SetLogFile() and set the
log level using SetLogLevel(). If needed you can also write to the logfile using OBFFLog(). There are four
log levels: BFF_LOGLVL_NONE, OBFF_LOGLVL_LOW, OBFF_LOGLVL_MEDIUM,
OBFF_LOGLVL_HIGH. See the API documentation to know what kind of output each function writes to the
logfile for the different log levels.

Below are two examples which explain the basics.

This piece of code will output a list of available forcefields to cout:

OBPlugin::List("forcefields");

Calculate the energy for the structure in mol using the Ghemical forcefield.

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

// See OBConversion class to fill the mol object.


OBMol mol;
// Select the forcefield, this returns a pointer that we
// will later use to access the forcefield functions.

Protected Attributes 456


Open Babel: API Documentation
OBForceField* pFF = OBForceField::FindForceField("MMFF94");

// Make sure we have a valid pointer


if (!pFF)
// exit...

// Set the logfile (can also be &cout or &cerr)


pFF->SetLogFile(&cerr);
// Set the log level. See indivual functions to know
// what kind of output each function produces for the
// different log levels.
pFF->SetLogLevel(OBFF_LOGLVL_HIGH);

// We need to setup the forcefield before we can use it. Setup()


// returns false if it failes to find the atom types, parameters, ...
if (!pFF->Setup(mol)) {
cerr << "ERROR: could not setup force field." << endl;
}

// Calculate the energy. The output will be written to the


// logfile specified by SetLogFile()
pFF->Energy();

Minimize the structure in mol using conjugate gradients.

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

OBMol mol;
OBForceField* pFF = OBForceField::FindForceField("MMFF94");

// Make sure we have a valid pointer


if (!pFF)
// exit...

pFF->SetLogFile(&cerr);
pFF->SetLogLevel(OBFF_LOGLVL_LOW);
if (!pFF->Setup(mol)) {
cerr << "ERROR: could not setup force field." << endl;
}

// Perform the actual minimization, maximum 1000 steps


pFF->ConjugateGradients(1000);

Minimize the structure in mol using steepest descent and fix the position of atom with index 1.

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

OBMol mol;
OBForceField* pFF = OBForceField::FindForceField("MMFF94");

// Make sure we have a valid pointer


if (!pFF)
// exit...

pFF->SetLogFile(&cerr);
pFF->SetLogLevel(OBFF_LOGLVL_LOW);

// Set the constraints

Detailed Description 457


Open Babel: API Documentation
OBFFConstraints constraints;
constraints.AddAtomConstraint(1);

// We pass the constraints as argument for Setup()


if (!pFF->Setup(mol, constraints)) {
cerr << "ERROR: could not setup force field." << endl;
}

// Perform the actual minimization, maximum 1000 steps


pFF->SteepestDescent(1000);

Minimize a ligand molecule in a binding pocket.

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

OBMol mol;

//
// Read the pocket + ligand (initial guess for position) into mol...
//

OBBitVec pocket; // set the bits with atoms indexes for the pocket to 1...
OBBitVec ligand; // set the bits with atoms indexes for the ligand to 1...

OBForceField* pFF = OBForceField::FindForceField("MMFF94");

// Make sure we have a valid pointer


if (!pFF)
// exit...

pFF->SetLogFile(&cerr);
pFF->SetLogLevel(OBFF_LOGLVL_LOW);

// Fix the binding pocket atoms


OBFFConstraints constraints;
FOR_ATOMS_OF_MOL (a, mol) {
if (pocket.BitIsOn(a->GetIdx())
constraints.AddAtomConstraint(a->GetIdx());
}

// Specify the interacting groups. The pocket atoms are fixed, so there
// is no need to calculate intra- and inter-molecular interactions for
// the binding pocket.
pFF->AddIntraGroup(ligand); // bonded interactions in the ligand
pFF->AddInterGroup(ligand); // non-bonded between ligand-ligand atoms
pFF->AddInterGroups(ligand, pocket); // non-bonded between ligand and pocket atoms

// We pass the constraints as argument for Setup()


if (!pFF->Setup(mol, constraints)) {
cerr << "ERROR: could not setup force field." << endl;
}

// Perform the actual minimization, maximum 1000 steps


pFF->SteepestDescent(1000);

Detailed Description 458


Open Babel: API Documentation

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

[inline,
virtual ~OBForceField ( )
virtual]
Destructor.

Member Function Documentation

OBFFParameter * GetParameter ( int a,


int b,
int c,
int d,
std::vector<
OBFFParameter > parameter
&
) [protected]
Get the correct OBFFParameter from a OBFFParameter vector.

vector<OBFFParameter> parameters;

this vector is filled with entries (as OBFFParameter) from a parameter file. This happens in the Setup()
function.

GetParameter(a, 0, 0, 0, parameters);

returns the first OBFFParameter from vector<OBFFParameter> parameters where: pa = a (pa = parameter.a)

use: vdw parameters, ...

GetParameter(a, b, 0, 0, parameters);

returns the first OBFFParameter from vector<OBFFParameter> parameters where: pa = a & pb = b (ab) or: pa
= b & pb = a (ba)

use: bond parameters, vdw parameters (pairs), ...

GetParameter(a, b, c, 0, parameters);

Member Typedef Documentation 459


Open Babel: API Documentation
returns the first OBFFParameter from vector<OBFFParameter> parameters where: pa = a & pb = b & pc = c
(abc) or: pa = c & pb = b & pc = a (cba)

use: angle parameters, ...

GetParameter(a, b, c, d, parameters);

returns the first OBFFParameter from vector<OBFFParameter> parameters where: pa = a & pb = b & pc = c
& pd = d (abcd) or: pa = d & pb = b & pc = c & pd = a (dbca) or: pa = a & pb = c & pc = b & pd = d (acbd)
or: pa = d & pb = c & pc = b & pd = a (dcba)

use: torsion parameters, ...

OBFFParameter * GetParameter ( const char * a,


const char * b,
const char * c,
const char * d,
std::vector<
OBFFParameter > parameter
&
) [protected]
see GetParameter(int a, int b, int c, int d, std::vector<OBFFParameter> &parameter)

int GetParameterIdx ( int a,


int b,
int c,
int d,
std::vector< OBFFParameter > & parameter
) [protected]
Get index for vector<OBFFParameter> ...

vector3 NumericalDerivative ( OBAtom * a,


int terms = OBFF_ENERGY
) [protected]
Calculate the potential energy function derivative numerically with repect to the coordinates of atom with
index a (this vector is the gradient)

Parameters:
a provides coordinates
terms OBFF_ENERGY, OBFF_EBOND, OBFF_EANGLE, OBFF_ESTRBND,
OBFF_ETORSION, OBFF_EOOP, OBFF_EVDW, OBFF_ELECTROSTATIC

Returns:
the negative gradient of atom a

Member Function Documentation 460


Open Babel: API Documentation

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::MolecularDynamicsTakeNSteps(), and
OBForceField::SteepestDescentTakeNSteps().

vector3 NumericalSecondDerivative ( OBAtom * a,


int terms = OBFF_ENERGY
) [protected]
OB 3.0.

void SetGradient ( double * grad,


int idx
[inline,
)
protected]
Set the gradient for atom with index idx to grad

void AddGradient ( double * grad,


int idx
) [inline, protected]
Add grad to the gradient for atom with index idx

virtual vector3 GetGradient ( OBAtom * a,


int = OBFF_ENERGY
[inline, protected,
)
virtual]
Get the pointer to the gradients

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::MolecularDynamicsTakeNSteps(), and
OBForceField::SteepestDescentTakeNSteps().

double* GetGradientPtr ( ) [inline, protected]


Get the pointer to the gradients

virtual void ClearGradients ( ) [inline, protected, virtual]


Set all gradients to zero

bool IsInSameRing ( OBAtom * a,


OBAtom * b
) [protected]

Member Function Documentation 461


Open Babel: API Documentation

Check if two atoms are in the same ring. [NOTE: this function uses SSSR, this means that not all rings are
found for bridged rings. This causes some problems with the MMFF94 validation.]

Parameters:
a atom a
b atom b

Returns:
true if atom a and b are in the same ring

virtual OBForceField* MakeNewInstance ( ) [pure virtual]


Clone the current instance. May be desirable in multithreaded environments, Should be deleted after use

const char* TypeID ( ) [inline]

Returns:
Plugin type ("forcefields")

static OBForceField* FindForceField ( const std::string & ID ) [inline, static]

Parameters:
ID forcefield id (Ghemical, MMFF94, UFF, ...).

Returns:
A pointer to a forcefield (the default if ID is empty), or NULL if not available.

[inline,
static OBForceField* FindForceField ( const char * ID )
static]

Parameters:
ID forcefield id (Ghemical, MMFF94, UFF, ...).

Returns:
A pointer to a forcefield (the default if ID is empty), or NULL if not available.

void SetParameterFile ( const std::string & filename ) [inline]

[inline,
virtual std::string GetUnit ( )
virtual]

Returns:
The unit (kcal/mol, kJ/mol, ...) in which the energy is expressed as std::string.

Member Function Documentation 462


Open Babel: API Documentation

virtual bool HasAnalyticalGradients ( ) [inline, virtual]

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::MolecularDynamicsTakeNSteps(), and
OBForceField::SteepestDescentTakeNSteps().

bool Setup ( OBMol & mol )


Setup the forcefield for mol (assigns atom types, charges, etc.). Keep current constraints.

Parameters:
mol The OBMol object that contains the atoms and bonds.

Returns:
True if succesfull.

bool Setup ( OBMol & mol,


OBFFConstraints
constraints
&
)
Setup the forcefield for mol (assigns atom types, charges, etc.). Use new constraints.

Parameters:
mol The OBMol object that contains the atoms and bonds.
constraints The OBFFConstraints object that contains the constraints.

Returns:
True if succesfull.

virtual bool ParseParamFile ( ) [inline, virtual]


Load the parameters (this function is overloaded by the individual forcefields, and is called autoamically from
OBForceField::Setup()).

Referenced by OBForceField::Setup().

virtual bool SetTypes ( ) [inline, virtual]


Set the atom types (this function is overloaded by the individual forcefields, and is called autoamically from
OBForceField::Setup()).

Referenced by OBForceField::GetGrid(), and OBForceField::Setup().

virtual bool SetFormalCharges ( ) [inline, virtual]


Set the formal charges (this function is overloaded by the individual forcefields, and is called autoamically
from OBForceField::Setup()).

Member Function Documentation 463


Open Babel: API Documentation

Referenced by OBForceField::Setup().

virtual bool SetPartialCharges ( ) [inline, virtual]


Set the partial charges (this function is overloaded by the individual forcefields, and is called autoamically
from OBForceField::Setup()).

Referenced by OBForceField::Setup().

virtual bool SetupCalculations ( ) [inline, virtual]


Setup the calculations (this function is overloaded by the individual forcefields, and is called autoamically
from OBForceField::Setup()).

Referenced by OBForceField::GetGrid(), OBForceField::SetConstraints(), and OBForceField::Setup().

virtual bool SetupPointers ( ) [inline, virtual]


Setup the pointers to the atom positions in the OBFFCalculation objects. This method will iterate over all the
calculations and call SetupPointers for each one. (This function should be implemented by the individual force
field implementations).

Referenced by OBForceField::RandomRotorSearchNextConformer(), OBForceField::SetConformers(),


OBForceField::SystematicRotorSearchNextConformer(), and OBForceField::WeightedRotorSearch().

OBMol
bool IsSetupNeeded ( mol )
&
Compare the internal forcefield OBMol object to mol. If the two have the same number of atoms and bonds,
and all atomic numbers are the same, this function returns false, and no call to Setup is needed.

Returns:
True if Setup needs to be called.

Referenced by OBForceField::Setup().

OBMol
bool GetAtomTypes ( mol )
&
Get the force atom types. The atom types will be added to the atoms of mol as OBPairData. The attribute will
be "FFAtomType".

...
pFF->Setup(&mol);
pFF->GetAtomTypes(&mol);
FOR_ATOMS_OF_MOL (atom, mol) {
OBPairData *type = (OBPairData*) atom->GetData("FFAtomType");
if (type)
cout << "atom " << atom->GetIdx() << " : " << type->GetValue() << endl;
}
...

Member Function Documentation 464


Open Babel: API Documentation

OBMol
bool GetPartialCharges ( mol )
&
Get the force field formal charges. The formal charges will be added to the atoms of mol as OBPairData. The
attribute will be "FFPartialCharge".

...
pFF->Setup(&mol);
pFF->GetPartialCharges(&mol);
FOR_ATOMS_OF_MOL (atom, mol) {
OBPairData *chg = (OBPairData*) atom->GetData("FFPartialCharge");
if (chg)
cout << "atom " << atom->GetIdx() << " : " << chg->GetValue() << endl;
}
...

OBMol
bool GetCoordinates ( mol )
&
Get coordinates for current conformer and attach OBConformerData with energies, forces, ... to mol.

Parameters:
mol The OBMol object to copy the coordinates to (from OBForceField::_mol).

Returns:
True if succesfull.

OBMol
bool UpdateCoordinates ( mol ) [inline]
&

Deprecated:
Use GetCooordinates instead.

OBMol
bool GetConformers ( mol )
&
Get coordinates for all conformers and attach OBConformerData with energies, forces, ... to mol.

Parameters:
mol The OBMol object to copy the coordinates to (from OBForceField::_mol).

Returns:
True if succesfull.

OBMol
bool UpdateConformers ( mol ) [inline]
&

Deprecated:
Use GetConformers instead.

Member Function Documentation 465


Open Babel: API Documentation

OBMol
bool SetCoordinates ( mol )
&
Set coordinates for current conformer.

Parameters:
mol the OBMol object to copy the coordinates from (to OBForceField::_mol).

Returns:
true if succesfull.

Referenced by OBForceField::Setup().

OBMol
bool SetConformers ( mol )
&
Set coordinates for all conformers.

Parameters:
mol The OBMol object to copy the coordinates from (to OBForceField::_mol).

Returns:
True if succesfull.

OBGridData * GetGrid ( double step,


double padding,
const char * type,
double pchg
)
Create a grid with spacing step and padding. Place a probe atom of type probe at every grid point,
calculate the energy and store it in the grid. These grids can then be used to create isosurfaces to identify
locations where the probe atom has favourable interactions with the molecule.

Parameters:
step The grid step size in A..
padding The padding for the grid in A.
type The force field atom type for the probe.
pchg The partial charge for the probe atom.

Returns:
Pointer to the grid constaining the results.

OBBitVec
void AddIntraGroup ( group )
&
Enable intra-molecular interactions for group (bonds, angles, strbnd, torsions, oop). This function should be
called before Setup().

Parameters:

Member Function Documentation 466


Open Babel: API Documentation

group OBBitVec with bits set for the indexes of the atoms which make up the group.

OBBitVec
void AddInterGroup ( group )
&
Enable inter-molecular interactions for group (non-bonded: vdw & ele). This function should be called before
Setup().

Parameters:
group OBBitVec with bits set for the indexes of the atoms which make up the group.

void AddInterGroups ( OBBitVec & group1,


OBBitVec & group2
)
Enable inter-molecular interactions between group1 and group2 (non-bonded: vdw & ele). Note that this
function doesn't enable bonded interactions in either group. Non-bonded interactions in the groups itself are
also not enabled. This function should be called before Setup().

Parameters:
group1 OBBitVec with bits set for the indexes of the atoms which make up the first group.
group2 OBBitVec with bits set for the indexes of the atoms which make up the second group.

void ClearGroups ( )
Clear all previously specified groups.

bool HasGroups ( )

Returns:
true if there are groups.

void EnableCutOff ( bool enable ) [inline]


Enable or disable Cut-offs. Cut-offs are disabled by default.

Parameters:
enable Enable when true, disable when false.

bool IsCutOffEnabled ( ) [inline]

Returns:
True if Cut-off distances are used.

void SetVDWCutOff ( double r ) [inline]


Set the VDW cut-off distance to r. Note that this does not enable cut-off distances.

Member Function Documentation 467


Open Babel: API Documentation

Parameters:
r The VDW cut-off distance to be used
in A.

double GetVDWCutOff ( ) [inline]


Get the VDW cut-off distance.

Returns:
The VDW cut-off distance in A.

void SetElectrostaticCutOff ( double r ) [inline]


Set the Electrostatic cut-off distance to r. Note that this does not enable cut-off distances.

Parameters:
r The electrostatic cut-off distance to be used in A.

double GetElectrostaticCutOff ( ) [inline]


Get the Electrostatic cut-off distance.

Returns:
The electrostatic cut-off distance in A.

void SetUpdateFrequency ( int f ) [inline]


Set the frequency by which non-bonded pairs are updated. Values from 10 to 20 are recommended. Too low
will decrease performance, too high will cause non-bonded interactions within cut-off not to be calculated.

Parameters:
f The pair list update frequency.

int GetUpdateFrequency ( ) [inline]


Get the frequency by which non-bonded pairs are updated.

Returns:
The pair list update frequency.

void UpdatePairsSimple ( )
Set the bits in _vdwpairs and _elepairs to 1 for interactions that are within cut-off distance. This function is
called in minimizing algorithms such as SteepestDescent and ConjugateGradients.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

Member Function Documentation 468


Open Babel: API Documentation

unsigned int GetNumPairs ( )


Get the number of non-bonded pairs in _mol.

Returns:
The number of pairs currently enabled (within cut-off distance)

void EnableAllPairs ( ) [inline]


Set bits in range 0..._numpairs-1 to 1. Using this means there will be no cut-off. (not-working: see code for
more information.

[inline,
virtual double Energy ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Total energy.

Output to log:
OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: none
OBFF_LOGLVL_MEDIUM: energy for indivudual energy terms
OBFF_LOGLVL_HIGH: energy for individual energy interactions

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::LineSearch(),
OBForceField::MolecularDynamicsTakeNSteps(), OBForceField::Newton2NumLineSearch(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SteepestDescentInitialize(),
OBForceField::SteepestDescentTakeNSteps(), OBForceField::SystematicRotorSearchNextConformer(), and
OBForceField::WeightedRotorSearch().

[inline,
virtual double E_Bond ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Bond stretching energy.

Output to log:
see Energy()

Member Function Documentation 469


Open Babel: API Documentation

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

[inline,
virtual double E_Angle ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Angle bending energy.

Output to log:
see Energy()

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

virtual double E_StrBnd ( bool = true ) [inline, virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Stretch bending energy.

Output to log:
see Energy()

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

[inline,
virtual double E_Torsion ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Torsional energy.

Output to log:
see Energy()

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

Member Function Documentation 470


Open Babel: API Documentation

[inline,
virtual double E_OOP ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Out-Of-Plane bending energy.

Output to log:
see Energy()

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

[inline,
virtual double E_VDW ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Van der Waals energy.

Output to log:
see Energy()

Referenced by OBForceField::GetGrid(), OBForceField::NumericalDerivative(), and


OBForceField::NumericalSecondDerivative().

[inline,
virtual double E_Electrostatic ( bool = true )
virtual]

Parameters:
gradients Set to true when the gradients need to be calculated (needs to be done before calling
GetGradient()).

Returns:
Electrostatic energy.

Output to log:
see Energy()

Referenced by OBForceField::GetGrid(), OBForceField::NumericalDerivative(), and


OBForceField::NumericalSecondDerivative().

Member Function Documentation 471


Open Babel: API Documentation

void PrintTypes ( )
Print the atom types to the log.

void PrintFormalCharges ( )
Print the formal charges to the log (atom.GetPartialCharge(), MMFF94 FC's are not always int).

void PrintPartialCharges ( )
Print the partial charges to the log.

void PrintVelocities ( )
Print the velocities to the log.

bool SetLogFile ( std::ostream * pos )


Set the stream for logging (can also be &cout for logging to screen).

Parameters:
pos Stream (when pos is 0, std::cout wil be
used).

Returns:
True if succesfull.

bool SetLogLevel ( int level )


Set the log level (OBFF_LOGLVL_NONE, OBFF_LOGLVL_LOW, OBFF_LOGLVL_MEDIUM,
OBFF_LOGLVL_HIGH). Inline if statements for logging are available:
#define IF_OBFF_LOGLVL_LOW if(_loglvl >= OBFF_LOGLVL_LOW)
#define IF_OBFF_LOGLVL_MEDIUM if(_loglvl >= OBFF_LOGLVL_MEDIUM)
#define IF_OBFF_LOGLVL_HIGH if(_loglvl >= OBFF_LOGLVL_HIGH)

example:

SetLogLevel(OBFF_LOGLVL_MEDIUM);
IF_OBFF_LOGLVL_HIGH {
OBFFLog("this text will NOT be logged...\n");
}

IF_OBFF_LOGLVL_LOW {
OBFFLog"this text will be logged...\n");
}

IF_OBFF_LOGLVL_MEDIUM {
OBFFLog("this text will also be logged...\n");
}

int GetLogLevel ( ) [inline]

Member Function Documentation 472


Open Babel: API Documentation

Returns:
The log level.

void OBFFLog ( std::string msg ) [inline]


Print msg to the logfile.

Parameters:
msg The message to print.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(),
OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(),
OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SteepestDescentInitialize(),
OBForceField::SteepestDescentTakeNSteps(), OBForceField::SystematicRotorSearchInitialize(),
OBForceField::SystematicRotorSearchNextConformer(), OBForceField::ValidateConjugateGradients(),
OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

const
void OBFFLog ( char msg ) [inline]
*
Print msg to the logfile.

Parameters:
msg The message to print.

void DistanceGeometry ( )
Generate coordinates for the molecule (distance geometry). (OB 3.0).

void SystematicRotorSearch ( unsigned int geomSteps = 2500 )


Generate conformers for the molecule (systematicaly rotating torsions).

The initial starting structure here is important, this structure should be minimized for the best results.
SystematicRotorSearch works by rotating around the rotatable bond in a molecule (see OBRotamerList class).
This rotating generates multiple conformers. The energy for all these conformers is then evaluated and the
lowest energy conformer is selected.

Parameters:
geomSteps The number of steps to take during geometry optimization.

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
this function will interfere with the output for this function.

OBFF_LOGLVL_NONE: None.

Member Function Documentation 473


Open Babel: API Documentation

OBFF_LOGLVL_LOW: Number of rotatable bonds, energies for the conformers, which one is the
lowest, ...
OBFF_LOGLVL_MEDIUM: See note above.
OBFF_LOGLVL_HIGH: See note above.

int SystematicRotorSearchInitialize ( unsigned int geomSteps = 2500 )


Generate conformers for the molecule by systematicaly rotating torsions. To be used in combination with
SystematicRotorSearchNexConformer().

example:

// pFF is a pointer to a OBForceField class


pFF->SystematicRotorSearchInitialize(300);
while (pFF->SystematicRotorSearchNextConformer(300)) {
// do some updating in your program (show last generated conformer, ...)
}

If you don't need any updating in your program, SystematicRotorSearch() is recommended.

Parameters:
geomSteps The number of steps to take during geometry optimization.

Returns:
The number of conformers.

Referenced by OBForceField::SystematicRotorSearch().

bool SystematicRotorSearchNextConformer ( unsigned int geomSteps = 2500 )


Evaluate the next conformer.

Parameters:
geomSteps The number of steps to take during geometry optimization.

Returns:
True if there are more conformers.

Referenced by OBForceField::SystematicRotorSearch().

void RandomRotorSearch ( unsigned int conformers,


unsigned int geomSteps = 2500
)
Generate conformers for the molecule (randomly rotating torsions).

The initial starting structure here is important, this structure should be minimized for the best results.
RandomRotorSearch works by randomly rotating around the rotatable bonds in a molecule (see
OBRotamerList class). This rotating generates multiple conformers. The energy for all these conformers is
then evaluated and the lowest energy conformer is selected.

Member Function Documentation 474


Open Babel: API Documentation

Parameters:
conformers The number of random conformers to consider during the search.
geomSteps The number of steps to take during geometry optimization for each conformer.

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
this function will interfere with the output for this function.

OBFF_LOGLVL_NONE: None.
OBFF_LOGLVL_LOW: Number of rotatable bonds, energies for the conformers, which one is the
lowest, ...
OBFF_LOGLVL_MEDIUM: See note above.
OBFF_LOGLVL_HIGH: See note above.

void RandomRotorSearchInitialize ( unsigned int conformers,


unsigned int geomSteps = 2500
)
Generate conformers for the molecule by randomly rotating torsions. To be used in combination with
RandomRotorSearchNexConformer().

example:

// pFF is a pointer to a OBForceField class


pFF->RandomRotorSearchInitialize(300);
while (pFF->RandomRotorSearchNextConformer(300)) {
// do some updating in your program (show last generated conformer, ...)
}

If you don't need any updating in your program, RandomRotorSearch() is recommended.

Parameters:
conformers The number of random conformers to consider during the search
geomSteps The number of steps to take during geometry optimization

Referenced by OBForceField::RandomRotorSearch().

bool RandomRotorSearchNextConformer ( unsigned int geomSteps = 2500 )


Evaluate the next conformer.

Parameters:
geomSteps The number of steps to take during geometry optimization.

Returns:
True if there are more conformers.

Referenced by OBForceField::RandomRotorSearch().

Member Function Documentation 475


Open Babel: API Documentation

void WeightedRotorSearch ( unsigned int conformers,


unsigned int geomSteps
)
Generate conformers for the molecule (randomly rotating torsions).

The initial starting structure here is important, this structure should be minimized for the best results.
WeightedRotorSearch works by randomly rotating around the rotatable bonds in a molecule (see
OBRotamerList class). Unlike RandomRotorSearch() the random choice of torsions is reweighted based on
the energy of the generated conformer. Over time, the generated conformers for each step should become
increasingly better. The lowest energy conformer is selected.

Parameters:
conformers The number of random conformers to consider during the search.
geomSteps The number of steps to take during geometry optimization for each conformer.

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
this function will interfere with the output for this function.

OBFF_LOGLVL_NONE: None.
OBFF_LOGLVL_LOW: Number of rotatable bonds, energies for the conformers, which one is the
lowest, ...
OBFF_LOGLVL_MEDIUM: See note above.
OBFF_LOGLVL_HIGH: See note above.

void SetLineSearchType ( int type ) [inline]


Set the LineSearchType. The default type is LineSearchType::Simple.

Parameters:
type The LineSearchType to be used in SteepestDescent and ConjugateGradients.

int GetLineSearchType ( ) [inline]


Get the LineSearchType.

Returns:
The current LineSearchType.

vector3 LineSearch ( OBAtom * atom,


vector3 & direction
)
Perform a linesearch starting at atom in direction direction.

Deprecated:
Current code should use LineSearch(double *, double*) instead.

Member Function Documentation 476


Open Babel: API Documentation

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().

double LineSearch ( double * currentCoords,


double * direction
)
Perform a linesearch for the entire molecule in direction direction. This function is called when using
LineSearchType::Simple.

Parameters:
currentCoords Start coordinates.
direction The search direction.

Returns:
alpha, The scale of the step we moved along the direction vector.

Output to log:
OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: none
OBFF_LOGLVL_MEDIUM: none
OBFF_LOGLVL_HIGH: none

double Newton2NumLineSearch ( double * direction )


Perform a linesearch for the entire molecule. This function is called when using
LineSearchType::Newton2Num.

Parameters:
direction The search direction.

Returns:
alpha, The scale of the step we moved along the direction vector.

Output to log:
OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: none
OBFF_LOGLVL_MEDIUM: none
OBFF_LOGLVL_HIGH: none

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().

void LineSearchTakeStep ( double * origCoords,


double * direction,
double step
)
Set the coordinates of the atoms to origCoord + step.

Member Function Documentation 477


Open Babel: API Documentation

Parameters:
origCoords Start coordinates.
direction The search direction.
step The step to take.

Referenced by OBForceField::Newton2NumLineSearch().

void SteepestDescent ( int steps,


double econv = 1e-6f,
int method = OBFF_ANALYTICAL_GRADIENT
)
Perform steepest descent optimalization for steps steps or until convergence criteria is reached.

Parameters:
steps The number of steps.
econv Energy convergence criteria. (defualt is 1e-6)
method Deprecated. (see HasAnalyticalGradients())

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: header including number of steps and first step
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::WeightedRotorSearch().

void SteepestDescentInitialize ( int steps = 1000,


double econv = 1e-6f,
int method = OBFF_ANALYTICAL_GRADIENT
)
Initialize steepest descent optimalization, to be used in combination with SteepestDescentTakeNSteps().

example:

// pFF is a pointer to a OBForceField class


pFF->SteepestDescentInitialize(100, 1e-5f);
while (pFF->SteepestDescentTakeNSteps(5)) {
// do some updating in your program (redraw structure, ...)
}

If you don't need any updating in your program, SteepestDescent() is recommended.

Parameters:

Member Function Documentation 478


Open Babel: API Documentation

steps The number of steps.


econv Energy convergence criteria. (defualt is 1e-6)
method Deprecated. (see HasAnalyticalGradients())

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: header including number of steps
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::SteepestDescent().

bool SteepestDescentTakeNSteps ( int n )


Take n steps in a steepestdescent optimalization that was previously initialized with
SteepestDescentInitialize().

Parameters:
n The number of steps to take.

Returns:
False if convergence or the number of steps given by SteepestDescentInitialize() has been reached.

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: step number, energy and energy for the previous step
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::SteepestDescent().

void ConjugateGradients ( int steps,


double econv = 1e-6f,
int method = OBFF_ANALYTICAL_GRADIENT
)
Perform conjugate gradient optimalization for steps steps or until convergence criteria is reached.

Parameters:
steps The number of steps.
econv Energy convergence criteria. (defualt is 1e-6)

Member Function Documentation 479


Open Babel: API Documentation

method Deprecated. (see HasAnalyticalGradients())

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: information about the progress of the minimization
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SystematicRotorSearchInitialize(),
OBForceField::SystematicRotorSearchNextConformer(), and OBForceField::WeightedRotorSearch().

void ConjugateGradientsInitialize ( int steps = 1000,


double econv = 1e-6f,
int method = OBFF_ANALYTICAL_GRADIENT
)
Initialize conjugate gradient optimalization and take the first step, to be used in combination with
ConjugateGradientsTakeNSteps().

example:

// pFF is a pointer to a OBForceField class


pFF->ConjugateGradientsInitialize(100, 1e-5f);
while (pFF->ConjugateGradientsTakeNSteps(5)) {
// do some updating in your program (redraw structure, ...)
}

If you don't need any updating in your program, ConjugateGradients() is recommended.

Parameters:
steps The number of steps.
econv Energy convergence criteria. (defualt is 1e-6)
method Deprecated. (see HasAnalyticalGradients())

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: header including number of steps and first step
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::ConjugateGradients().

Member Function Documentation 480


Open Babel: API Documentation

bool ConjugateGradientsTakeNSteps ( int n )


Take n steps in a conjugate gradient optimalization that was previously initialized with
ConjugateGradientsInitialize().

Parameters:
n The number of steps to take.

Returns:
False if convergence or the number of steps given by ConjugateGradientsInitialize() has been reached.

Output to log:
This function should only be called with the log level set to OBFF_LOGLVL_NONE or
OBFF_LOGLVL_LOW. Otherwise too much information about the energy calculations needed for
the minimization will interfere with the list of energies for succesive steps.

OBFF_LOGLVL_NONE: none
OBFF_LOGLVL_LOW: step number, energy and energy for the previous step
OBFF_LOGLVL_MEDIUM: see note above
OBFF_LOGLVL_HIGH: see note above

Referenced by OBForceField::ConjugateGradients().

void GenerateVelocities ( )
Generate starting velocities with a Maxwellian distribution.

Referenced by OBForceField::MolecularDynamicsTakeNSteps().

void CorrectVelocities ( )
Correct the velocities so that the following is true:

3N
----
0.5 \ m_i * v_i^2 = 0.5 * Ndf * kB * T = E_kin
/
----
i=1

E_kin : kinetic energy


m_i : mass of atom i
v_i : velocity of atom i
Ndf : number of degrees of freedom (3 * number of atoms)
kB : Boltzmann's constant
T : temperature

Referenced by OBForceField::GenerateVelocities(), and OBForceField::MolecularDynamicsTakeNSteps().

void MolecularDynamicsTakeNSteps ( int n,


double T,
double timestep = 0.001,

Member Function Documentation 481


Open Babel: API Documentation

int method = OBFF_ANALYTICAL_GRADIENT


)
Take n steps at temperature T. If no velocities are set, they will be generated.

example:

// pFF is a pointer to a OBForceField class


while (pFF->MolecularDynamicsTakeNSteps(5, 300)) {
// do some updating in your program (redraw structure, ...)
}

Parameters:
n The number of steps to take.
T Absolute temperature in Kelvin.
timestep The time step in picoseconds. (10e-12 s)
method OBFF_ANALYTICAL_GRADIENTS (default) or OBFF_NUMERICAL_GRADIENTS

OBFFConstraints & GetConstraints ( )


Get the current constraints.

Returns:
The current constrains stored in the force field.

void SetConstraints ( OBFFConstraints & constraints )


Set the constraints.

Parameters:
constraints The new constraints to be used.

void SetFixAtom ( int index )


Fix the atom position until UnsetFixAtom() is called. This function can be used in programs that allow the
user to interact with a molecule that is being minimized without having to check if the atom is already fixed in
the constraints set by Setup() or SetConstraints(). Using this makes sure the selected atom follows the mouse
cursur.

Parameters:
index The index for the atom to fix.

void UnsetFixAtom ( )
Undo last SetFixAtom. This function will not remove the fix atom constraint for this atom if set by Setup() or
SetConstraints().

void SetIgnoreAtom ( int index )


Ignore the atom until UnsetIgnoreAtom() is called. This function can be used in programs that allow the user
to interact with a molecule that is being minimized without having to check if the atom is already ignored in

Member Function Documentation 482


Open Babel: API Documentation

the constraints set by Setup() or SetConstraints(). Using this makes sure, in drawing mode, you can close rings
without your newly created puching the other atoms away.

Parameters:
index The index for the atom to ignore.

void UnsetIgnoreAtom ( )
Undo last SetIgnoreAtom. This function will not remove the ignore atom constraint for this atom if set by
Setup() or SetConstraints().

bool IgnoreCalculation ( int a,


int b
) [static]
internal function

Referenced by OBForceField::IgnoreCalculation().

bool IgnoreCalculation ( int a,


int b,
int c
) [static]
internal function

bool IgnoreCalculation ( int a,


int b,
int c,
int d
) [static]
internal function

bool DetectExplosion ( )
(debugging)

vector3 ValidateLineSearch ( OBAtom * atom,


vector3 & direction
)
(debugging)

Referenced by OBForceField::ValidateConjugateGradients(), and OBForceField::ValidateSteepestDescent().

Member Function Documentation 483


Open Babel: API Documentation

void ValidateSteepestDescent ( int steps )


(debugging)

void ValidateConjugateGradients ( int steps )


(debugging)

[inline,
virtual bool Validate ( )
virtual]
Validate the force field implementation (debugging).

virtual bool ValidateGradients ( ) [inline, virtual]


Validate the analytical gradients by comparing them to numerical ones. This function has to be implemented
force field specific. (debugging)

vector3 ValidateGradientError ( vector3 & numgrad,


vector3 & anagrad
)
Calculate the error of the analytical gradient (debugging)

Returns:
error = fabs(numgrad - anagrad) / anagrad * 100%

double VectorBondDerivative ( double * pos_a,


double * pos_b,
double * force_a,
double * force_b
) [static]
Calculate the derivative of a vector length. The vector is given by a - b, the length of this vector rab =
sqrt(ab.x^2 + ab.y^2 + ab.z^2).

Parameters:
pos_a atom a (coordinates)
pos_b atom b (coordinates)
force_a - return value for the force on atom a
force_b - return value for the force on atom b

Returns:
The distance between a and b (bondlength for bond stretching, separation for vdw, electrostatic)

const
double VectorDistanceDerivative ( double pos_i,
*const

Member Function Documentation 484


Open Babel: API Documentation

const
double pos_j,
*const
double * force_i,
double * force_j
) [static]
To be used for VDW or Electrostatic interactions. This is faster than VectorBondDerivative, but does no error
checking.

vector3
double VectorLengthDerivative ( a,
&
vector3
b
&
) [static]

Deprecated:

Referenced by OBFFConstraints::GetConstraintEnergy().

double VectorAngleDerivative ( double * pos_a,


double * pos_b,
double * pos_c,
double * force_a,
double * force_b,
double * force_c
) [static]
Calculate the derivative of a angle a-b-c. The angle is given by dot(ab,cb)/rab*rcb. Used for harmonic (cubic)
angle potentials.

Parameters:
pos_a atom a (coordinates)
pos_b atom b (coordinates)
pos_c atom c (coordinates)
force_a - return value for the force on atom a
force_b - return value for the force on atom b
force_c - return value for the force on atom c

Returns:
The angle between a-b-c

Referenced by OBFFConstraints::GetConstraintEnergy().

vector3
double VectorAngleDerivative ( a,
&

Member Function Documentation 485


Open Babel: API Documentation

vector3
b,
&
vector3
c
&
) [static]

Deprecated:

double VectorOOPDerivative ( double * pos_a,


double * pos_b,
double * pos_c,
double * pos_d,
double * force_a,
double * force_b,
double * force_c,
double * force_d
) [static]
Calculate the derivative of a OOP angle a-b-c-d. b is the central atom, and a-b-c is the plane. The OOP angle
is given by 90° - arccos(dot(corss(ab,cb),db)/rabbc*rdb).

Parameters:
pos_a atom a (coordinates)
pos_b atom b (coordinates)
pos_c atom c (coordinates)
pos_d atom d (coordinates)
force_a - return value for the force on atom a
force_b - return value for the force on atom b
force_c - return value for the force on atom c
force_d - return value for the force on atom d

Returns:
The OOP angle for a-b-c-d

double VectorOOPDerivative ( vector3 & a,


vector3 & b,
vector3 & c,
vector3 & d
) [static]

Deprecated:

double VectorTorsionDerivative ( double * pos_a,


double * pos_b,

Member Function Documentation 486


Open Babel: API Documentation

double * pos_c,
double * pos_d,
double * force_a,
double * force_b,
double * force_c,
double * force_d
) [static]
Calculate the derivative of a torsion angle a-b-c-d. The torsion angle is given by
arccos(dot(corss(ab,bc),cross(bc,cd))/rabbc*rbccd).

Parameters:
pos_a atom a (coordinates)
pos_b atom b (coordinates)
pos_c atom c (coordinates)
pos_d atom d (coordinates)
force_a - return value for the force on atom a
force_b - return value for the force on atom b
force_c - return value for the force on atom c
force_d - return value for the force on atom d

Returns:
The tosion angle for a-b-c-d

Referenced by OBFFConstraints::GetConstraintEnergy().

vector3
double VectorTorsionDerivative ( a,
&
vector3
b,
&
vector3
c,
&
vector3
d
&
) [static]

Deprecated:

static void VectorSubtract ( double * i,


double * j,
double * result
) [inline, static]
inline fuction to speed up minimization speed

Parameters:

Member Function Documentation 487


Open Babel: API Documentation

i pointer to i[3]
j pointer to j[3]
result pointer to result[3], will be set
to i - j

Referenced by OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(),


OBForceField::VectorBondDerivative(), OBForceField::VectorDistanceDerivative(),
OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

static void VectorSubtract ( const double *const i,


const double *const j,
double * result
) [inline, static]

static void VectorAdd ( double * i,


double * j,
double * result
[inline,
)
static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]
result pointer to result[3], will be set to
i+j

Referenced by OBForceField::VectorAngleDerivative(), OBForceField::VectorOOPDerivative(), and


OBForceField::VectorTorsionDerivative().

static void VectorDivide ( double * i,


double n,
double * result
) [inline, static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
n divide x,y,z with n
result pointer to result[3]

Referenced by OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(),


OBForceField::VectorBondDerivative(), OBForceField::VectorOOP(),

Member Function Documentation 488


Open Babel: API Documentation

OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and


OBForceField::VectorTorsionDerivative().

static void VectorMultiply ( double * i,


double n,
double * result
) [inline, static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
n multiply x,y,z with n
result pointer to result[3]

Referenced by OBForceField::VectorBondDerivative(), OBForceField::VectorDistanceDerivative(),


OBForceField::VectorOOPDerivative(), and OBForceField::VectorTorsionDerivative().

static void VectorMultiply ( const double *const i,


const double n,
double * result
[inline,
)
static]

static void VectorSelfMultiply ( double * i,


double n
) [inline, static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3], multiply this vector by n and set this vector to the result.
n the scalar value to be multipled

Referenced by OBForceField::VectorAngleDerivative(), OBForceField::VectorDistanceDerivative(), and


OBForceField::VectorOOPDerivative().

static void VectorNormalize ( double * i ) [inline, static]


inline fuction to speed up minimization speed

Parameters:
i pointer to i[3] to be normalized

Referenced by OBForceField::VectorAngleDerivative().

Member Function Documentation 489


Open Babel: API Documentation

static void VectorCopy ( double * from,


double * to
) [inline, static]
inline fuction to speed up minimization speed

Parameters:
from pointer to i[3] to be copied from
to pointer to j[3] to be copied to

[inline,
static double VectorLength ( double * i )
static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]

Returns:
the vector length

Referenced by OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(),


OBForceField::VectorBondDerivative(), OBForceField::VectorDistanceDerivative(),
OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

static double VectorDistance ( double * pos_i,


double * pos_j
[inline,
)
static]

Referenced by OBForceField::UpdatePairsSimple().

double VectorAngle ( double * i,


double * j,
double * k
) [static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]
k pointer to k[3]

Returns:
the vector angle ijk (deg)

Member Function Documentation 490


Open Babel: API Documentation

double VectorTorsion ( double * i,


double * j,
double * k,
double * l
) [static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]
k pointer to k[3]
l pointer to l[3]

Returns:
the vector torson ijkl (deg)

double VectorOOP ( double * i,


double * j,
double * k,
double * l
) [static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]
k pointer to k[3]
l pointer to l[3]

Returns:
the vector torson ijkl (deg)

[inline,
static void VectorClear ( double * i )
static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3], will set x,y,z to 0,0,0

Referenced by OBForceField::VectorAngleDerivative(), OBForceField::VectorOOPDerivative(), and


OBForceField::VectorTorsionDerivative().

static double VectorDot ( double * i,


double * j

Member Function Documentation 491


Open Babel: API Documentation

) [inline, static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]

Returns:
the dot product

Referenced by OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(),


OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

static void VectorCross ( double * i,


double * j,
double * result
[inline,
)
static]
inline fuction to speed up minimization speed

Parameters:
i pointer to i[3]
j pointer to j[3]
result the dot product (as a return value double[3])

Referenced by OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(),


OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

static void PrintVector ( double * i ) [inline, static]

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().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]

Member Function Documentation 492


Open Babel: API Documentation

Write information on a plugin class to the string txt. Return false if not written. The default implementation
outputs: the ID, a tab character, and the first line of the Description. The param string can be used in derived
types to provide different outputs.

Reimplemented in OBDescriptor, and OBFormat.

Referenced by OBDescriptor::Display().

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.

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,

Member Function Documentation 493


Open Babel: API Documentation

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.

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().

Member Function Documentation 494


Open Babel: API Documentation

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 Data Documentation

OBMol _mol [protected]


Molecule to be evaluated or minimized.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::CorrectVelocities(),
OBForceField::DetectExplosion(), OBForceField::DistanceGeometry(), OBForceField::GenerateVelocities(),
OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBForceField::GetGrid(), OBForceField::GetNumPairs(), OBForceField::GetPartialCharges(),
OBForceField::IsInSameRing(), OBForceField::IsSetupNeeded(), OBForceField::LineSearch(),
OBForceField::LineSearchTakeStep(), OBForceField::MolecularDynamicsTakeNSteps(),
OBForceField::Newton2NumLineSearch(), OBForceField::PrintFormalCharges(),
OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(), OBForceField::PrintVelocities(),
OBForceField::RandomRotorSearchInitialize(), OBForceField::RandomRotorSearchNextConformer(),
OBForceField::SetConformers(), OBForceField::SetConstraints(), OBForceField::SetCoordinates(),
OBForceField::Setup(), OBForceField::SteepestDescentTakeNSteps(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
OBForceField::UpdatePairsSimple(), and OBForceField::WeightedRotorSearch().

bool _init [protected]


Used to make sure we only parse the parameter file once, when needed.

Referenced by OBForceField::Setup().

std::string _parFile [protected]

bool _validSetup [protected]


< parameter file name

was the last call to Setup succesfull

Member Data Documentation 495


Open Babel: API Documentation

Referenced by OBForceField::SetConstraints(), and OBForceField::Setup().

double* _gradientPtr [protected]


pointer to the gradients (used by AddGradient(), minimization functions, ...)

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GetCoordinates(), OBForceField::Setup(),
and OBForceField::SteepestDescentTakeNSteps().

std::ostream* _logos [protected]


Output for logfile.

Referenced by OBForceField::SetLogFile().

char _logbuf[BUFF_SIZE+1] [protected]


Temporary buffer for logfile output.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(),
OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(),
OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SteepestDescentInitialize(),
OBForceField::SteepestDescentTakeNSteps(), OBForceField::SystematicRotorSearchInitialize(),
OBForceField::SystematicRotorSearchNextConformer(), OBForceField::ValidateConjugateGradients(),
OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

int _loglvl [protected]


Log level for output.

Referenced by OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SetLogLevel(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
and OBForceField::WeightedRotorSearch().

int _origLogLevel [protected]

Referenced by OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SystematicRotorSearchInitialize(), and
OBForceField::SystematicRotorSearchNextConformer().

int _current_conformer [protected]


used to hold i for current conformer (needed by UpdateConformers)

Member Data Documentation 496


Open Babel: API Documentation

Referenced by OBForceField::GetConformers(), OBForceField::RandomRotorSearchInitialize(),


OBForceField::RandomRotorSearchNextConformer(), OBForceField::SetConformers(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
and OBForceField::WeightedRotorSearch().

std::vector<double> _energies [protected]


used to hold the energies for all conformers

Referenced by OBForceField::GetConformers(), OBForceField::GetCoordinates(),


OBForceField::RandomRotorSearchInitialize(), OBForceField::RandomRotorSearchNextConformer(),
OBForceField::SystematicRotorSearchInitialize(), and
OBForceField::SystematicRotorSearchNextConformer().

double _econv [protected]

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

double _e_n1 [protected]


Used for conjugate gradients and steepest descent(Initialize and TakeNSteps).

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::Newton2NumLineSearch(),
OBForceField::SteepestDescentInitialize(), and OBForceField::SteepestDescentTakeNSteps().

int _cstep [protected]

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

int _nsteps [protected]


Used for conjugate gradients and steepest descent(Initialize and TakeNSteps).

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

double* _grad1 [protected]


Used for conjugate gradients and steepest descent(Initialize and TakeNSteps).

Referenced by OBForceField::ConjugateGradientsInitialize(), and

Member Data Documentation 497


Open Babel: API Documentation

OBForceField::ConjugateGradientsTakeNSteps().

unsigned int _ncoords [protected]


Number of coordinates for conjugate gradients.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::CorrectVelocities(),
OBForceField::GenerateVelocities(), OBForceField::LineSearchTakeStep(),
OBForceField::Newton2NumLineSearch(), OBForceField::Setup(), and
OBForceField::SteepestDescentTakeNSteps().

int _linesearch [protected]


LineSearch type.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().

double _timestep [protected]


Molecular dynamics time step in picoseconds.

Referenced by OBForceField::MolecularDynamicsTakeNSteps().

double _temp [protected]


Molecular dynamics temperature in Kelvin.

Referenced by OBForceField::CorrectVelocities(), OBForceField::GenerateVelocities(), and


OBForceField::MolecularDynamicsTakeNSteps().

double* _velocityPtr [protected]


pointer to the velocities

Referenced by OBForceField::CorrectVelocities(), OBForceField::GenerateVelocities(),


OBForceField::MolecularDynamicsTakeNSteps(), OBForceField::PrintVelocities(), and
OBForceField::Setup().

OBFFConstraints _constraints = OBFFConstraints() [static, protected]


Constraints.

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(),
OBForceField::GetConstraints(), OBForceField::LineSearch(),
OBForceField::MolecularDynamicsTakeNSteps(), OBForceField::Newton2NumLineSearch(),
OBForceField::SetConstraints(), OBForceField::Setup(), OBForceField::SteepestDescentInitialize(), and

Member Data Documentation 498


Open Babel: API Documentation

OBForceField::SteepestDescentTakeNSteps().

int _fixAtom = 0 [static, protected]


SetFixAtom()/UnsetFixAtom().

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(),
OBForceField::MolecularDynamicsTakeNSteps(), OBForceField::SetFixAtom(),
OBForceField::SteepestDescentTakeNSteps(), and OBForceField::UnsetFixAtom().

int _ignoreAtom = 0 [static, protected]


SetIgnoreAtom()/UnsetIgnoreAtom().

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(),
OBForceField::IgnoreCalculation(), OBForceField::MolecularDynamicsTakeNSteps(),
OBForceField::SetIgnoreAtom(), OBForceField::SteepestDescentTakeNSteps(), and
OBForceField::UnsetIgnoreAtom().

bool _cutoff [protected]


true = cut-off enabled

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::SteepestDescentInitialize(), and
OBForceField::SteepestDescentTakeNSteps().

double _rvdw [protected]


VDW cut-off distance.

Referenced by OBForceField::UpdatePairsSimple().

double _rele [protected]


Electrostatic cut-off distance.

Referenced by OBForceField::UpdatePairsSimple().

OBBitVec _vdwpairs [protected]


VDW pairs that should be calculated.

Referenced by OBForceField::UpdatePairsSimple().

OBBitVec _elepairs [protected]

Member Data Documentation 499


Open Babel: API Documentation

Electrostatic pairs that should be calculated.

Referenced by OBForceField::UpdatePairsSimple().

int _pairfreq [protected]


The frequence to update non-bonded pairs.

Referenced by OBForceField::ConjugateGradientsTakeNSteps(), and


OBForceField::SteepestDescentTakeNSteps().

std::vector<OBBitVec> _intraGroup [protected]


groups for which intra-molecular interactions should be calculated

Referenced by OBForceField::AddIntraGroup(), OBForceField::ClearGroups(), and


OBForceField::HasGroups().

std::vector<OBBitVec> _interGroup [protected]


groups for which intra-molecular interactions should be calculated

Referenced by OBForceField::AddInterGroup(), OBForceField::ClearGroups(), and


OBForceField::HasGroups().

std::vector<std::pair<OBBitVec, OBBitVec> > _interGroups [protected]


groups for which intra-molecular interactions should be calculated

Referenced by OBForceField::AddInterGroups(), OBForceField::ClearGroups(), and


OBForceField::HasGroups().

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following files:

• forcefield.h
• forcefield.cpp

Member Data Documentation 500


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 501


OBFormat Member List
This is the complete list of members for OBFormat, including all inherited members.

_id OBPlugin [protected]


[inline, protected,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin
static]
Begin(const char *PluginID) OBPlugin [inline, static]
Description()=0 OBFormat [pure virtual]
Display(std::string &txt, const char *param, const char
OBFormat [virtual]
*ID=NULL)
End(const char *PluginID) OBPlugin [inline, static]
FirstLine(const char *txt) OBPlugin [static]
Flags() OBFormat [inline, virtual]
FormatFromMIME(const char *MIME) OBFormat [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetMIMEType() OBFormat [inline]
GetPlugin(const char *Type, const char *ID) OBPlugin [inline, static]
GetType() OBFormat [virtual]
GetTypeMap(const char *PluginID) OBPlugin [protected, 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]
MakeNewInstance() OBFormat [inline, virtual]
OBFormat() OBFormat [inline]
PluginIterator typedef OBPlugin
[inline, protected,
PluginMap() OBPlugin
static]
PluginMapType typedef OBPlugin
ReadChemObject(OBConversion *) OBFormat [inline, virtual]
ReadMolecule(OBBase *, OBConversion *) OBFormat [inline, virtual]
RegisterFormat(const char *ID, const char *MIME=NULL) OBFormat
SkipObjects(int, OBConversion *) OBFormat [inline, virtual]
SpecificationURL() OBFormat [inline, virtual]
TargetClassDescription() OBFormat [virtual]
TypeID() OBFormat [inline]
WriteChemObject(OBConversion *) OBFormat [inline, virtual]
WriteMolecule(OBBase *, OBConversion *) OBFormat [inline, virtual]
~OBPlugin() OBPlugin [inline, virtual]

OBFormat Member List 502


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

OpenBabel::OBFormat

OBFormat Member List 503


OBFormat Class Reference
Base class for file formats. More...

#include <openbabel/obconversion.h>

Inheritance diagram for OBFormat:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


OBFormat ()
const char * TypeID ()
virtual bool ReadMolecule (OBBase *, OBConversion *)
virtual bool ReadChemObject (OBConversion *)
virtual bool WriteMolecule (OBBase *, OBConversion *)
virtual bool WriteChemObject (OBConversion *)
virtual const char * Description ()=0
virtual const char * TargetClassDescription ()
virtual const std::type_info & GetType ()
virtual const char * SpecificationURL ()
const char * GetMIMEType ()
virtual unsigned int Flags ()
virtual int SkipObjects (int, OBConversion *)

OBFormat Class Reference 504


Open Babel: API Documentation
virtual OBFormat * MakeNewInstance ()
int RegisterFormat (const char *ID, const char *MIME=NULL)
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static OBFormat * FormatFromMIME (const char *MIME)
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 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 file formats.

Two sets of Read and Write functions are specified for each format to handle two different requirements. The
"Convert" interface is for use in file format conversion applications. The user interface, a console, a GUI, or
another program is kept unaware of the details of the chemistry and does not need to #include mol.h. It is then
necessary to manipulate only pointers to OBBase in OBConversion and the user interface, with all the
construction and deletion of OBMol etc objects being done in the Format classes or the OB core. The
convention with "Covert" interface functions is that chemical objects are made on the heap with new in the
ReadChemicalObject() functions and and deleted in WriteChemicalObject() functions

The "API" interface is for programatic use of the OB routines in application programs where mol.h is
#included. There is generally no creation or destruction of objects in ReadMolecule() and WriteMolecule()
and no restriction on whether the pointers are to the heap or the stack.

Public Member Functions 505


Open Babel: API Documentation

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

OBFormat ( ) [inline]
Default constructor. Registration via RegisterFormat(), not via constructor as in other plugins.

Member Function Documentation

const char* TypeID ( ) [inline]

Referenced by OBFormat::RegisterFormat().

virtual bool ReadMolecule ( OBBase * ,


OBConversion *
) [inline, virtual]
The "API" interface Read function.

Reads a single object. Does not make a new object on the heap; can be used with a pointer to an chem object
on the heap or the stack.

Reimplemented in XMLMoleculeFormat.

Referenced by OBMoleculeFormat::DeferMolOutput(), OBConversion::Read(), and


OBMoleculeFormat::ReadChemObjectImpl().

[inline,
virtual bool ReadChemObject ( OBConversion * )
virtual]
The "Convert" interface Read function.

Possibly reads multiple new objects on the heap and subjects them to its DoTransformations() function, which
may delete them again. Sends result to pConv->AddChemObject()

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

Referenced by OBConversion::Convert().

Member Typedef Documentation 506


Open Babel: API Documentation

virtual bool WriteMolecule ( OBBase * ,


OBConversion *
) [inline, virtual]
The "API" interface Write function.

Writes a single object Does not delete the object; can be used with a pointer to an chem object on the heap or
the stack.

Returns:
false on error.

Referenced by OBMoleculeFormat::OutputDeferredMols(), OBConversion::Write(), and


OBMoleculeFormat::WriteChemObjectImpl().

virtual bool WriteChemObject ( OBConversion * ) [inline, virtual]


The "Convert" interface Write function.

Writes a single object Deletes the object after writing

Returns:
false on error

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

Referenced by OBConversion::AddChemObject(), and OBConversion::Convert().

virtual const char* Description ( ) [pure virtual]


Information on this format. Printed out in response to -Hxxx option where xxx id the id of the format.

Must be provided by each format class. Can include a list of command line Options. These may be used to
construction check boxes, radio buttons etc for GUI interface.

Reimplemented from OBPlugin.

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(),


OBMoleculeFormat::OutputDeferredMols(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::RegisterOptionParam(), and OBMoleculeFormat::WriteChemObjectImpl().

const char * TargetClassDescription ( ) [virtual]


A decription of the chemical object converted by this format.

If not provided, the object type used by the default format is used (usually OBMol).

Referenced by OBConversion::ReportNumberConverted().

Member Function Documentation 507


Open Babel: API Documentation

const type_info & GetType ( ) [virtual]

Returns:
the type of chemical object used by the format. Defaults to that used by the default format. Useful for
checking that a format can handle a particular object.

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

virtual const char* SpecificationURL ( ) [inline, virtual]


Web address where the format is defined.

Referenced by OBFormat::Display().

const char* GetMIMEType ( ) [inline]


Chemical MIME type associated with this file type (if any).

virtual unsigned int Flags ( ) [inline, virtual]


Decribes the capabilities of the format (Read only etc.).

Currently, can be a bitwise OR of any of the following NOTREADABLE READONEONLY


NOTWRITABLE WRITEONEONLY DEFAULTFORMAT READBINARY WRITEBINARY READXML

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBFormat::Display(),


OBConversion::FullConvert(), OBConversion::GetNextFormat(), OBConversion::InstallStreamFilter(),
OBConversion::OpenAndSetFormat(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::ReadFile(), OBFormat::RegisterFormat(), OBConversion::SetInFormat(),
OBConversion::SetOutFormat(), and OBConversion::WriteFile().

virtual int SkipObjects ( int ,


OBConversion *
[inline,
)
virtual]
Skip past first n objects in input stream (or current one with n=0).

Returns:
1 on success, -1 on error and 0 if not implemented

Reimplemented in XMLBaseFormat.

Referenced by OBConversion::Convert(), and OBConversion::SetStartAndEnd().

virtual OBFormat* MakeNewInstance ( ) [inline, virtual]

Returns:

Member Function Documentation 508


Open Babel: API Documentation

a pointer to a new instance of the format, or NULL if fails. Normally a single global instance is used
but this may cause problems if there are member variables and the format is used in more than one
place in the program.

int RegisterFormat ( const char * ID,


const char * MIME = NULL
)

Referenced by OBConversion::RegisterFormat().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual]
Provides a description in txt of the format specified by itr. If param starts with "in", read", "out" or "write"
only the appropriate formats are output. The others return false. If param contains "verbose", the whole
description is output.

Reimplemented from OBPlugin.

OBFormat * FormatFromMIME ( const char * MIME ) [static]

Referenced by OBConversion::FormatFromMIME().

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.

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().

Member Function Documentation 509


Open Babel: API Documentation

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.

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().

Member Function Documentation 510


Open Babel: API Documentation

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 Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following files:

• format.h
• format.cpp

Member Data Documentation 511


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 512


OBGastChrg Member List
This is the complete list of members for OBGastChrg, including all inherited members.

AssignPartialCharges(OBMol &) OBGastChrg


GSVResize(int) OBGastChrg
OBGastChrg() OBGastChrg [inline]
~OBGastChrg() OBGastChrg

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::OBGastChrg

OBGastChrg Member List 513


OBGastChrg Class Reference
Assigns Gasteiger partial charges. More...

#include <openbabel/molchrg.h>

List of all members.

Public Member
Functions
OBGastChrg ()
~OBGastChrg ()
bool AssignPartialCharges (OBMol &)
void GSVResize (int)

Detailed Description
Assigns Gasteiger partial charges.

The OBGastChrg class is responsible for the assignment of partial charges to a molecule according to the
Gasteiger charge model (sigma). When the partial charge of an atom is requested and partial charges do not
yet exist for the molecule the OBGastChrg class will automatically be called to assign charges for the
molecule. If charges have been read in for a molecule the following code shows how to force the recalculation
of partial charges:

OBMol mol;

mol.UnsetPartialChargesPerceived();
FOR_ATOMS_IN_MOL(atom, mol)
{
cout << "atom number = " << atom->GetIdx();
cout << " charge = " << atom->GetPartialCharge() << endl;
}

Formal charges are used as seed values of the initial charge of atoms, and the partial charge is propagated to
neighboring atoms. For example, quaternary amines would have a +1 charge, and the effect of the positive
charge would be felt by neighboring atoms according to the Gasteiger model (sigma).

For more information, see: J. Gasteiger & M. Marsili, "A New Model for Calculating Atomic Charges in
Molecules" Tetrahedron Lett., (1978) 3181-3184.

Constructor & Destructor Documentation

OBGastChrg ( ) [inline]

OBGastChrg Class Reference 514


Open Babel: API Documentation

~OBGastChrg ( )

Member Function Documentation

bool AssignPartialCharges ( OBMol & mol )


Assign partial charges to this OBMol, setting each OBAtom partial charge.

Referenced by OBAtom::GetPartialCharge().

void GSVResize ( int size )


Resize the internal GasteigerState vector to match the size of the molecule.

Referenced by OBGastChrg::AssignPartialCharges().

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
• Namespaces
• Classes
• Files

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

Constructor & Destructor Documentation 515


OBGenericData Member List
This is the complete list of members for OBGenericData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBGenericData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
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]
[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:55 2008 by 1.5.6.

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

• Alphabetical List

OBGenericData Member List 516


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBGenericData

OBGenericData Member List 517


OBGenericData Class Reference
Base class for generic data. More...

#include <openbabel/generic.h>

Inheritance diagram for OBGenericData:

OBGenericData Class Reference 518


Open Babel: API Documentation

OBGenericData Class Reference 519


Open Babel: API Documentation
[legend]

List of all members.

Public Member Functions


OBGenericData (const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin source=any)
virtual OBGenericData * Clone (OBBase *) const
virtual ~OBGenericData ()
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 _attr
unsigned int _type
DataOrigin _source

Detailed Description
Base class for generic data.

OBGenericData is an abstract base class which defines an interface for storage, retrieval, and indexing of
arbitrary generic data. Subclasses of OBGenericData can be used to store custom data on a per-atom,
per-bond, per-molecule, or per-residue basis. Open Babel currently supports a small subset of chemical
functionality as OBGenericData types, which will expand over time to support additional interconversion
(e.g., spectroscopy, dynamics, surfaces...)

For more information on currently supported types, please see the developer wiki:
http://openbabel.sourceforge.net/wiki/Generic_Data

For your own custom data, either define a custom subclass using an id from the
OBGenericDataType::CustomData0 to OBGenericDataType::CustomData15 slots, or store your data as a
string and use OBPairData for key/value access. The latter is highly recommended for various text descriptors
e.g., in QSAR, atom or bond labels, or other textual data.

New in Open Babel, version 2.1 is the template-based OBPairTemplate, which can be used to store arbitrary
data types. There are predefined types OBPairInteger and OBPairFloatingPoint for storing integers and
floating-point values without converting to a string representation.

Also new is the "source" or "origin" of a data entry, enumerated by DataOrigin. This can be accessed by
SetOrigin() and GetOrigin(), as well as via "filtering" methods in OBBase, allowing you to separate data read

Public Member Functions 520


Open Babel: API Documentation

in from a file, added by a user, or assigned by Open Babel internally.

While the library and import routines will set DataOrigin correctly, you should try to annotate data added by
your code. Typically this would either be userAdded or external. The former refers to something the user
requested as an annotation, while the latter refers to annotations your code adds automatically.

Example code using OBGenericData:

if (mol.HasData(OBGenericDataType::UnitCell))
{
uc = (OBUnitCell*)mol.GetData(OBGenericDataType::UnitCell);
sprintf(buffer,
"%10.5f%10.5f%10.5f%10.5f%10.5f%10.5f",
uc->GetA(), uc->GetB(), uc->GetC(),
uc->GetAlpha() , uc->GetBeta(), uc->GetGamma());
ofs << buffer << endl;
}

...

vector<OBGenericData*>::iterator k;
vector<OBGenericData*> vdata = mol.GetData();
for (k = vdata.begin();k != vdata.end();++k)
if ((*k)->GetDataType() == OBGenericDataType::PairData)
{
ofs << "> <" << (*k)->GetAttribute() << ">" << endl;
ofs << ((OBPairData*)(*k))->GetValue() << endl << endl;
}

Similar code also works for OBGenericData stored in an OBAtom or OBBond or OBResidue. These
examples show use of DataOrigin outside of the Open Babel library.

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);
}

...

if (bond.HasData("DisplayType")) // e.g. in a visualization tool


{
OBPairData *display = dynamic_cast<OBPairData *> bond.GetData("DisplayType");
if (display->GetValue() == "wireframe")
{
... // display a wireframe view
}
}

When designing a class derived from OBGenericData you must add a Clone() function. For classes used with
OBMol this is used when an OBMol object is copied. If your class member variables contain pointers to
atoms or bonds then it will be necessary to ensure that these are updated in Clone() to refer to the new
molecule. Without these and similar pointers it is more likely that the very simple clone function

Detailed Description 521


Open Babel: API Documentation
virtual OBGenericData* Clone(OBBase* parent) const
{return new MyNewClass(*this);}

and the compiler generated copy constructor would be sufficient.

It is recommended that, if possible, OBGenericData classes do not store atom and bond pointers. Using atom
and bond indices instead would allow the simple version of Clone() above. See OBRotameterData::Clone for
an example of a more complicated version. For classes which are not intended to support copying, Clone() can
return NULL

virtual OBGenericData* Clone(OBBase* parent) const


{return NULL;}

Clone() is a pure virtual function so that you need to decide what kind of function you need and include it
explicitly.

Constructor & Destructor Documentation

OBGenericData ( const std::string attr = "undefined",


type =
const unsigned int
OBGenericDataType::UndefinedData,
const DataOrigin source = any
)

virtual ~OBGenericData ( ) [inline, virtual]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented in AliasData, OBAtomClassData, OBCommentData, OBExternalBondData, OBPairData,


OBSetData, OBVirtualBond, OBRingData, OBUnitCell, OBConformerData, OBSymmetryData,
OBTorsionData, OBAngleData, OBChiralData, OBSerialNums, OBVibrationData, OBRotationData,
OBVectorData, OBMatrixData, OBRateData, OBNasaThermoData, and OBRotamerList.

Referenced by OBBase::CloneData(), and OBMoleculeFormat::MakeCombinedMolecule().

void SetAttribute ( const std::string & v ) [inline]


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().

Constructor & Destructor Documentation 522


Open Babel: API Documentation

void SetOrigin ( const DataOrigin s ) [inline]


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().

virtual const std::string& GetAttribute ( ) const [inline, virtual]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

const
unsigned int GetDataType ( )
[inline]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual]


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().

const [inline,
virtual DataOrigin GetOrigin ( )
virtual]

Member Data Documentation

std::string _attr [protected]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

Member Function Documentation 523


Open Babel: API Documentation

DataOrigin _source [protected]


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:

• base.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:55 2008 by 1.5.6.

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

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

Member Data Documentation 524


OBGlobalDataBase Member List
This is the complete list of members for OBGlobalDataBase, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
GetSize() OBGlobalDataBase [inline, virtual]
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
ParseLine(const char *) OBGlobalDataBase [inline, virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~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
• Class Members

OpenBabel::OBGlobalDataBase

OBGlobalDataBase Member List 525


OBGlobalDataBase Class Reference
Base data table class, handles reading data files. More...

#include <openbabel/data.h>

Inheritance diagram for OBGlobalDataBase:

[legend]

List of all members.

Public Member Functions


OBGlobalDataBase ()
virtual ~OBGlobalDataBase ()
void Init ()
virtual unsigned int GetSize ()
void SetReadDirectory (char *dir)

OBGlobalDataBase Class Reference 526


Open Babel: API Documentation

void SetEnvironmentVariable (char *var)


virtual void ParseLine (const char *)

Protected Attributes
bool _init
const char * _dataptr
std::string _filename
std::string _dir
std::string _subdir
std::string _envvar

Detailed Description
Base data table class, handles reading data files.

Base data table class--reads ASCII data files in various formats

1. Checks for the environment variable _envvar (defaults to "BABEL_DATADIR")

• Tries the _subdir directory if defined (def. "data") and then the main directory

1. Checks for the directory _dir (def. determined by the build environment)

• Tries the subdirectory corresponding to this version, then the main directory

1. Reverts to the compiled-in default data

Constructor & Destructor Documentation

OBGlobalDataBase ( ) [inline]
Constructor.

virtual ~OBGlobalDataBase ( ) [inline, virtual]


Destructor.

Member Function Documentation

void Init ( )
Read in the data file, falling back as needed.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),

Public Member Functions 527


Open Babel: API Documentation

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().

virtual unsigned int GetSize ( ) [inline, virtual]

Returns:
the size of the database (for error checking)

Reimplemented in OBBondTyper, OBElementTable, OBIsotopeTable, OBTypeTable, OBResidueData,


OBPhModel, OBRotorRules, OBAtomTyper, OBAromaticTyper, and OBRingTyper.

Referenced by OBGlobalDataBase::Init().

void SetReadDirectory ( char * dir ) [inline]


Set the directory before calling Init().

void SetEnvironmentVariable ( char * var ) [inline]


Set the environment variable to use before calling Init().

virtual void ParseLine ( const char * ) [inline, virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented in OBBondTyper, OBElementTable, OBIsotopeTable, OBTypeTable, OBResidueData,


OBPhModel, OBRotorRules, OBAtomTyper, OBAromaticTyper, and OBRingTyper.

Referenced by OBGlobalDataBase::Init().

Member Data Documentation

bool _init [protected]


Whether the data been read already.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),

Member Function Documentation 528


Open Babel: API Documentation

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]


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]


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]


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]


Subdirectory (if using environment variable).

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),
OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),

Member Data Documentation 529


Open Babel: API Documentation

OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _envvar [protected]


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:

• data.h
• data.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 530


OBGrid Member List
This is the complete list of members for OBGrid, including all inherited members.

_vdata OBBase [protected]


_xmax OBGrid [protected]
_xmin OBGrid [protected]
_ymax OBGrid [protected]
_ymin OBGrid [protected]
_zmax OBGrid [protected]
_zmin OBGrid [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
GetXmax() const OBGrid [inline]
GetXmin() const OBGrid [inline]
GetYmax() const OBGrid [inline]
GetYmin() const OBGrid [inline]
GetZmax() const OBGrid [inline]
GetZmin() const OBGrid [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
Init(OBMol &box) OBGrid [virtual]
OBGrid() OBGrid [inline]

OBGrid Member List 531


Open Babel: API Documentation

PointIsInBox(double x, double y, double z) OBGrid [inline]


PointIsInBox(double *c) OBGrid [inline]
PointIsInBox(vector3 v) OBGrid [inline]
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:


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::OBGrid

OBGrid Member List 532


OBGrid Class Reference
A base grid class. More...

#include <openbabel/grid.h>

Inheritance diagram for OBGrid:

[legend]

List of all members.

Public Member Functions


OBGrid ()
virtual void Init (OBMol &box)
double GetXmin () const
double GetYmin () const
double GetZmin () const
double GetXmax () const
double GetYmax () const
double GetZmax () const
bool PointIsInBox (double x, double y, double z)
bool PointIsInBox (double *c)
bool PointIsInBox (vector3 v)
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)

OBGrid Class Reference 533


Open Babel: API Documentation

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 ()

Protected Attributes
double _xmin
double _xmax
double _ymin
double _ymax
double _zmin
double _zmax
std::vector< OBGenericData * > _vdata

Detailed Description
A base grid class.

Constructor & Destructor Documentation

OBGrid ( ) [inline]

Member Function Documentation

void Init ( OBMol & box ) [virtual]


Initialize the grid based on a box around the molecule box Subclasses should overload this method -- this
only tracks the dimension of the box itself.

Referenced by OBFloatGrid::Init(), and OBProxGrid::Setup().

const
double GetXmin ( )
[inline]

Public Member Functions 534


Open Babel: API Documentation

Returns:
the minimum x point of the grid

const
double GetYmin ( )
[inline]

Returns:
the minimum y point of the grid

double GetZmin ( ) const [inline]

Returns:
the minimum z point of the grid

double GetXmax ( ) const [inline]

Returns:
the maximum x point of the grid

double GetYmax ( ) const [inline]

Returns:
the maximum y point of the grid

double GetZmax ( ) const [inline]

Returns:
the maximum z point of the grid

bool PointIsInBox ( double x,


double y,
double z
) [inline]

Returns:
whether the supplied XYZ coordinates fall within the box

Referenced by OBProxGrid::Setup().

double
bool PointIsInBox ( c ) [inline]
*

Member Function Documentation 535


Open Babel: API Documentation

Returns:
true if the point falls within the box

bool PointIsInBox ( vector3 v ) [inline]

Returns:
true if the point falls within the box

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.

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.

Member Function Documentation 536


Open Babel: API Documentation

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.

[inline,
void SetData ( OBGenericData * d )
inherited]
Adds a data object; does nothing if d==NULL.

Member Function Documentation 537


Open Babel: API Documentation

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]

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

Member Function Documentation 538


Open Babel: API Documentation

[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 539


Open Babel: API Documentation

Member Data Documentation

double _xmin [protected]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _xmax [protected]

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymin [protected]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymax [protected]

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmin [protected]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmax [protected]


the min/max axes in XYZ axes (i.e., the box)

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

Member Data Documentation 540


Open Babel: API Documentation

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:

• grid.h
• grid.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 541


OBGridData Member List
This is the complete list of members for OBGridData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
ANGSTROM enum value OBGridData
BOHR enum value OBGridData
[inline,
Clone(OBBase *) const OBGenericData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetAxes(double x[3], double y[3], double z[3]) const OBGridData
GetAxes(vector3 &v1, vector3 &v2, vector3 &v3) const OBGridData
GetDataType() const OBGenericData [inline]
GetMaxValue() const OBGridData
GetMaxVector() const OBGridData
GetMinValue() const OBGridData
GetNumberOfPoints(int &nx, int &ny, int &nz) const OBGridData
GetNumberOfPoints() const OBGridData
GetNumberOfSteps(int steps[3]) const OBGridData
GetNumSymmetries() const OBGridData
[inline,
GetOrigin() const OBGenericData
virtual]
GetOriginVector() const OBGridData
GetOriginVector(double o[3]) const OBGridData
GetUnit() const OBGridData
GetUnrestricted() const OBGridData
GetValue(int i, int j, int k) const OBGridData
GetValue(vector3 pos) const OBGridData
[inline,
OpenBabel::OBGenericData::GetValue() const OBGenericData
virtual]
GetValues() const OBGridData
GetXAxis() const OBGridData
GetYAxis() const OBGridData
GetZAxis() const OBGridData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBGridData() OBGridData
OTHER enum value OBGridData
SetAttribute(const std::string &v) OBGenericData [inline]

OBGridData Member List 542


Open Babel: API Documentation

SetLimits(const vector3 &origin, const vector3 &x, const vector3 &y,


OBGridData
const vector3 &z)
SetLimits(const double origin[3], const double x[3], const double y[3],
OBGridData
const double z[3])
SetNumberOfPoints(int nx, int ny, int nz) OBGridData
SetNumSymmetries(int s) OBGridData
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetUnit(Unit u) OBGridData
SetUnrestricted(bool u) OBGridData
SetValue(int i, int j, int k, double val) OBGridData
SetValues(const std::vector< double > &v) OBGridData
Unit enum name OBGridData
[inline,
~OBGenericData() OBGenericData
virtual]
~OBGridData() OBGridData

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::OBGridData

OBGridData Member List 543


OBGridData Class Reference
Store values for numeric grids such as orbitals or electrostatic potential. More...

#include <openbabel/griddata.h>

Inheritance diagram for OBGridData:

[legend]

List of all members.

Public Types
enum Unit { BOHR, ANGSTROM, OTHER }

Public Member Functions


OBGridData ()
~OBGridData ()
virtual OBGenericData * Clone (OBBase *) 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
Property Methods
void GetAxes (double x[3], double y[3], double z[3]) const
vector3 GetXAxis () const
vector3 GetYAxis () const
vector3 GetZAxis () const
void GetAxes (vector3 &v1, vector3 &v2, vector3 &v3) const
void GetNumberOfPoints (int &nx, int &ny, int &nz) const
int GetNumberOfPoints () const
void GetNumberOfSteps (int steps[3]) const
std::vector< double > GetValues () const
double GetValue (int i, int j, int k) const
double GetValue (vector3 pos) const
Unit GetUnit () const
double GetMinValue () const
double GetMaxValue () const

OBGridData Class Reference 544


Open Babel: API Documentation
vector3 GetOriginVector () const
void GetOriginVector (double o[3]) const
vector3 GetMaxVector () const
bool GetUnrestricted () const
int GetNumSymmetries () const
Modification Methods
void SetNumberOfPoints (int nx, int ny, int nz)
void SetLimits (const vector3 &origin, const vector3 &x, const vector3 &y, const
vector3 &z)
void SetLimits (const double origin[3], const double x[3], const double y[3], const
double z[3])
bool SetValue (int i, int j, int k, double val)
void SetValues (const std::vector< double > &v)
void SetUnit (Unit u)
void SetUnrestricted (bool u)
void SetNumSymmetries (int s)

Protected Attributes
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Store values for numeric grids such as orbitals or electrostatic potential.

Since:
version 2.2

See also:
OBFloatGrid

OBGridData facilitates attaching grids and cubes to molecular data. A "grid" is data representing some
function f(x,y,z), such as a molecule's electrostatic potential or molecular orbitals. This need not be a "cube"
even though this file format from Gaussian is frequently used. Axes need not be identical, and indeed do not
need to be orthogonal.

Open Babel supports reading several types of grid file formats, including Gaussian cube, and OpenDX. The
latter is notably used by the APBS program for numeric evaluation of molecular and protein electrostatic
potential.

OBGridData *gd = new OBGridData;


gd->SetAttribute("Example Grid"); // the title of the grid -- e.g., for user display
vector<int> voxels(3); // the number of voxels in each direction
vector3 origin; // the beginning x, y, z coordinate of the grid
vector<vector3> axes; // the xyz displacements for each of the grid axes
...
gd->SetNumberOfPoints(voxels[0], voxels[1], voxels[2]);
gd->SetLimits(origin, axes[0], axes[1], axes[2]);

Public Member Functions 545


Open Babel: API Documentation
gd->SetUnit(OBGridData::ANGSTROM);
gd->SetOrigin(fileformatInput); // i.e., is this data from a file or determined by Open Bab

for (int k = 0; k < voxels[2]; ++k)


for (int j = 0; j < voxels[1]; ++j)
for (int i = 0; i < voxels[0]; ++i)
{
gd->SetValue(i, j, k,
grid[k*voxels[0]*voxels[1] + j*voxels[0] + i]);
}

mol->SetData(gd);

if (mol->HasData(OBGenericDataType::GridData)) {
vector<OBGenericData*> grids = mol->GetAllData(OBGenericDataType::GridData)
// Output the name of the grid
if (grids[0] != NULL)
cout << grids[0]->GetAttribute();
}

Member Enumeration Documentation

enum Unit
Unit of measure for grid spacings.

Enumerator:
BOHR
ANGSTROM
OTHER

Constructor & Destructor Documentation

OBGridData ( )
Constructor.

~OBGridData ( )
Destructor.

Member Function Documentation

void GetAxes ( double x[3],


double y[3],
double z[3]
) const

Returns:

Detailed Description 546


Open Babel: API Documentation

the three axes parallel to the grid edges. The length of the returned vector is the step along that
direction.

vector3 GetXAxis ( ) const

Returns:
X axis direction.

vector3 GetYAxis ( ) const

Returns:
Y axis direction.

vector3 GetZAxis ( ) const

Returns:
Z axis direction.

void GetAxes ( vector3 & v1,


vector3 & v2,
vector3 & v3
) const

Returns:
the three axes parallel to the grid edges

int
void GetNumberOfPoints ( nx,
&
int
ny,
&
int
nz
&
) const

Returns:
number of points along the three axes parallel to the grid edges.

int GetNumberOfPoints ( ) const

Returns:
total number of points in the grid.

Member Function Documentation 547


Open Babel: API Documentation

void GetNumberOfSteps ( int steps[3] ) const

Returns:
number of points along the three axes parallel to the grid edges.

std::vector< double > GetValues ( ) const

Returns:
grid values as a vector of doubles.

double GetValue ( int i,


int j,
int k
) const

Returns:
the value at position i, j, k in the grid.

Referenced by OBForceField::GetGrid().

double GetValue ( vector3 pos ) const

Returns:
the value at a position in the grid (by interpolation)

OBGridData::Unit GetUnit ( ) const

Returns:
the unit of measure for grid spacings.

double GetMinValue ( ) const

Returns:
the minimum value of all points in the grid.

double GetMaxValue ( ) const

Returns:
the maximum value of all points in the grid.

vector3 GetOriginVector ( ) const

Member Function Documentation 548


Open Babel: API Documentation

Returns:
vector3 of the origin (i.e., the minimum x, y, and z coords of the grid).

void GetOriginVector ( double o[3] ) const

Parameters:
o set to the origin (i.e., the minimum x, y, and z coords of the grid).

Deprecated:
Will be removed.

See also:
GetOriginVector()

vector3 GetMaxVector ( ) const

Returns:
The maximum point in the grid.

bool GetUnrestricted ( ) const

Returns:
the unrestricted flag.

int GetNumSymmetries ( ) const

Returns:
the number of symmetries.

void SetNumberOfPoints ( int nx,


int ny,
int nz
)
Set number of points along the three axes.

Referenced by OBForceField::GetGrid().

void SetLimits ( const vector3 & origin,


const vector3 & x,
const vector3 & y,
const vector3 & z
)

Member Function Documentation 549


Open Babel: API Documentation

Set the limits (i.e., the origin point and the axes) NOTE: You must set the number of points first, with
SetNumberOfPoints so the grid spacing can be calculated

Referenced by OBForceField::GetGrid().

void SetLimits ( const double origin[3],


const double x[3],
const double y[3],
const double z[3]
)

Deprecated:
Will be removed.

See also:
SetLimits(const vector3 &origin, const vector3 &x, const vector3 &y, const vector3 &z)

bool SetValue ( int i,


int j,
int k,
double val
)
Set an individual value, grid must have been initialised.

Referenced by OBForceField::GetGrid().

void SetValues ( const std::vector< double > & v )


Set the values, this vector must match the dimensions of the grid.

void SetUnit ( OBGridData::Unit u )


Set the unit of measure.

void SetUnrestricted ( bool u )


Set the unrestricted flag.

void SetNumSymmetries ( int s )


Set the number of symmetries.

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual, inherited]

Member Function Documentation 550


Open Babel: API Documentation

Reimplemented in AliasData, OBAtomClassData, OBCommentData, OBExternalBondData, OBPairData,


OBSetData, OBVirtualBond, OBRingData, OBUnitCell, OBConformerData, OBSymmetryData,
OBTorsionData, OBAngleData, OBChiralData, OBSerialNums, OBVibrationData, OBRotationData,
OBVectorData, OBMatrixData, OBRateData, OBNasaThermoData, and OBRotamerList.

Referenced by OBBase::CloneData(), and OBMoleculeFormat::MakeCombinedMolecule().

[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 551


Open Babel: API Documentation

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data 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 files:

• griddata.h
• griddata.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

Member Data Documentation 552


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 553


OBGroupContrib Member List
This is the complete list of members for OBGroupContrib, 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,
OBDescriptor [protected, static]
std::string &s, bool noEval, bool NoCompOK=false)
DeleteProperties(OBBase *pOb, const std::string &DescrList) OBDescriptor [static]
Description() OBGroupContrib [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
OBPlugin [static]
*param=NULL)
ListAsVector(const char *PluginID, const char *param,
OBPlugin [static]
std::vector< std::string > &vlist)
MakeInstance(const std::vector< std::string > &textlines) OBGroupContrib [inline, virtual]
MatchPairData(OBBase *pOb, std::string &s) OBDescriptor [protected, static]
OBGroupContrib(const char *ID, const char *filename, const
OBGroupContrib [inline]
char *descr)
ParsePredicate(std::istream &optionText, char &ch1, char
OBDescriptor [protected, static]
&ch2, std::string &svalue)
PluginIterator typedef OBPlugin
[inline, protected,
PluginMap() OBPlugin
static]

OBGroupContrib Member List 554


Open Babel: API Documentation

PluginMapType typedef OBPlugin


Predict(OBBase *pOb) OBGroupContrib [virtual]
PredictAndSave(OBBase *pOb) OBDescriptor
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:57 2008 by 1.5.6.

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

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

OpenBabel::OBGroupContrib

OBGroupContrib Member List 555


OBGroupContrib Class Reference
Handle group contribution algorithms. More...

#include <openbabel/groupcontrib.h>

Inheritance diagram for OBGroupContrib:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


OBGroupContrib (const char *ID, const char *filename, const char *descr)
virtual const char * Description ()
virtual OBGroupContrib * MakeInstance (const std::vector< std::string > &textlines)
virtual double Predict (OBBase *pOb)
const char * TypeID ()
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)
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)

OBGroupContrib Class Reference 556


Open Babel: API Documentation
static std::string GetValues (OBBase *pOb, const std::string &DescrList)
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
Handle group contribution algorithms.

This is the base class for calculations that use the JOELib2 contribution algorithm.

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Static Public Member Functions 557


Open Babel: API Documentation

Constructor & Destructor Documentation

OBGroupContrib ( const char * ID,


const char * filename,
const char * descr
) [inline]
constructor. Each instance provides an ID and a datafile.

Predict the logP, MR, TPSA (each instance of OBGroupContrib uses different parameters loaded from its own
datafile) for molecule mol using the group contributions algorithm from JOELib2.

Member Function Documentation

virtual const char* Description ( ) [virtual]


Required description of a sub-type.

Reimplemented from OBPlugin.

virtual OBGroupContrib* MakeInstance ( const std::vector< std::string > & ) [inline, virtual]
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 from OBPlugin.

virtual double Predict ( OBBase * pOb ) [virtual]

Returns:
the value of a numeric descriptor

Reimplemented from OBDescriptor.

const char* TypeID ( ) [inline, inherited]

double PredictAndSave ( OBBase * pOb ) [inherited]

Returns:
the value of the descriptor and adds it to the object's OBPairData

Referenced by OBDescriptor::AddProperties().

Constructor & Destructor Documentation 558


Open Babel: API Documentation

double GetStringValue ( OBBase * pOb,


std::string & svalue
) [virtual, inherited]
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,
)
inherited]
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
not called and the function returns false.

Referenced by OBDescriptor::FilterCompare().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]
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,
)
inherited]
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

Member Function Documentation 559


Open Babel: API Documentation

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, inherited]
Reads list of descriptor IDs and calls PredictAndSave() for each.

Referenced by OBMol::DoTransformations().

void DeleteProperties ( OBBase * pOb,


const std::string & DescrList
) [static, inherited]
Deletes all the OBPairDatas whose attribute names are in the list (if they exist).

Referenced by OBMol::DoTransformations().

string GetValues ( OBBase * pOb,


const std::string & DescrList
) [static, inherited]
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, inherited]


Read an identifier from the filter string.

Referenced by OBDescriptor::FilterCompare().

double ParsePredicate ( std::istream & optionText,


char & ch1,
char & ch2,
std::string & svalue

Member Function Documentation 560


Open Babel: API Documentation

[static, protected,
)
inherited]
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, inherited]
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().

bool std::istream
( optionText,
CompareStringWithFilter &
std::string & s,
bool noEval,
NoCompOK =
bool
false
[static, protected,
)
inherited]
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, inherited]

Referenced by OBDescriptor::Compare(), OBDescriptor::FilterCompare(), OBDescriptor::GetIdentifier(), and


OBDescriptor::GetValues().

Member Function Documentation 561


Open Babel: API Documentation

bool MatchPairData ( OBBase * pOb,


std::string & s
) [static, protected, inherited]

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().

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().

Member Function Documentation 562


Open Babel: API Documentation

string ListAsString ( const char * PluginID,


const char * param = NULL
[static,
)
inherited]
As ListAsVector but returns a string containing the list.

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

Member Function Documentation 563


Open Babel: API Documentation

[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 Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following file:

• groupcontrib.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 Data Documentation 564


OBInternalCoord Member List
This is the complete list of members for OBInternalCoord, including all inherited members.

_a OBInternalCoord
_ang OBInternalCoord
_b OBInternalCoord
_c OBInternalCoord
_dst OBInternalCoord
_tor OBInternalCoord
OBInternalCoord(OBAtom *a=NULL, OBAtom *b=NULL, OBAtom
OBInternalCoord [inline]
*c=NULL, double dst=0.0, double ang=0.0, double tor=0.0)

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::OBInternalCoord

OBInternalCoord Member List 565


OBInternalCoord Class Reference
Used to transform from z-matrix to cartesian coordinates. More...

#include <openbabel/internalcoord.h>

List of all members.

Public Member Functions


OBInternalCoord (OBAtom *a=NULL, OBAtom *b=NULL, OBAtom *c=NULL, double
dst=0.0, double ang=0.0, double tor=0.0)

Public Attributes
OBAtom * _a
OBAtom * _b
OBAtom * _c
double _dst
double _ang
double _tor

Detailed Description
Used to transform from z-matrix to cartesian coordinates.

Used with OpenBabel::InternalToCartesian and OpenBabel::CartesianToInternal methods. Does not perform


any actions itself. You must create or free OBAtom pointers yourself.

The z-matrix representation uses coordinates relative to up to three atoms, which need not be bonded in any
fashion. A rough sketch of the a, b, and c atoms would be:

'*'
/
/
a----b
/
/
c

where the OBInternalCoord record reflects the '*' atom.

Warning:
Does not detect if NULL pointers are used. You should be careful.

OBInternalCoord Class Reference 566


Open Babel: API Documentation

Constructor & Destructor Documentation

OBInternalCoord ( OBAtom * a = NULL,


OBAtom * b = NULL,
OBAtom * c = NULL,
double dst = 0.0,
double ang = 0.0,
double tor = 0.0
) [inline]
Constructor.

Member Data Documentation

OBAtom* _a
First connection for this atom (i.e., distance).

OBAtom* _b
Second reference atom (i.e., angle).

OBAtom* _c
Third reference atom (i.e., dihedral / torsion angle).

double _dst
Distance between this atom and _a.

double _ang
Angle between this, _a, and _b (i.e., _a is the vertex).

double _tor
Torsional/dihedral angle between this, _a, _b, and _c.

The documentation for this class was generated from the following file:

• internalcoord.h

Constructor & Destructor Documentation 567


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 568


OBIsotopeTable Member List
This is the complete list of members for OBIsotopeTable, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
GetExactMass(const unsigned int atomicNum, const unsigned
OBIsotopeTable
int isotope=0)
[inline,
GetSize() OBIsotopeTable
virtual]
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
OBIsotopeTable(void) OBIsotopeTable
ParseLine(const char *) OBIsotopeTable [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
[inline,
~OBGlobalDataBase() OBGlobalDataBase
virtual]
~OBIsotopeTable() OBIsotopeTable [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:55 2008 by 1.5.6.

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

OBIsotopeTable Member List 569


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBIsotopeTable

OBIsotopeTable Member List 570


OBIsotopeTable Class Reference
Table of atomic isotope masses. More...

#include <openbabel/data.h>

Inheritance diagram for OBIsotopeTable:

[legend]

List of all members.

Public Member Functions


OBIsotopeTable (void)
~OBIsotopeTable ()
unsigned int GetSize ()
void ParseLine (const char *)
double GetExactMass (const unsigned int atomicNum, const unsigned int isotope=0)
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
Table of atomic isotope masses.

OBIsotopeTable Class Reference 571


Open Babel: API Documentation

Constructor & Destructor Documentation

OBIsotopeTable ( void )

~OBIsotopeTable ( ) [inline]

Member Function Documentation

unsigned int GetSize ( ) [inline, virtual]

Returns:
the number of elements in the isotope table

Reimplemented from OBGlobalDataBase.

void ParseLine ( const char * ) [virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

double GetExactMass ( const unsigned int atomicNum,


const unsigned int isotope = 0
)

Returns:
the exact masss of the isotope (or by default (i.e. "isotope 0") the most abundant isotope)

Referenced by OBAtom::GetAtomicMass(), OBMol::GetExactMass(), and OBAtom::GetExactMass().

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(),

Constructor & Destructor Documentation 572


Open Babel: API Documentation

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(),
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().

Member Function Documentation 573


Open Babel: API Documentation

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(),
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:

• data.h
• data.cpp

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

Member Data Documentation 574


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 575


OBLocale Member List
This is the complete list of members for OBLocale, including all inherited members.

d OBLocale [protected]
OBLocale() OBLocale
RestoreLocale() OBLocale
SetLocale() OBLocale
~OBLocale() OBLocale

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::OBLocale

OBLocale Member List 576


OBLocale Class Reference
Handle the locale for numeric data parsing. More...

#include <openbabel/locale.h>

List of all members.

Public Member
Functions
OBLocale ()
~OBLocale ()
void SetLocale ()
void RestoreLocale ()

Protected Attributes
OBLocalePrivate * d

Detailed Description
Handle the locale for numeric data parsing.

Many users will utilize Open Babel and tools built on top of the library in non-English locales. In particular,
the numeric locale (LC_NUMERIC) is used to determine the parsing of numeric data in files, reference data,
etc.

The OBLocale class, and its global variable obLocale handle both internal parsing of data through the
ANSI-C numeric locale and can be used for external use as well.

In particular, where available, OBLocale will use the enhanced uselocale() interface, which sets the locale for
a particular thread, rather for the entire process. (This is available on Linux, Mac OS X, and other platforms.)

obLocale.SetLocale(); // set the numeric locale before reading data


... // your data processing here
obLocale.RestoreLocale(); // restore the numeric locale

To prevent errors, OBLocale will handle reference counting. If nested function calls all set the locale, only the
first call to SetLocale() and the last call to RestoreLocale() will do any work.

Constructor & Destructor Documentation

OBLocale ( )

OBLocale Class Reference 577


Open Babel: API Documentation

~OBLocale ( )

Member Function Documentation

void SetLocale ( )

Referenced by OBGlobalDataBase::Init(), OBBuilder::LoadFragments(), OBConversion::Read(), and


OBConversion::Write().

void RestoreLocale ( )

Referenced by OBGlobalDataBase::Init(), OBBuilder::LoadFragments(), OBConversion::Read(), and


OBConversion::Write().

Member Data Documentation

OBLocalePrivate* d [protected]

Referenced by OBLocale::OBLocale(), OBLocale::RestoreLocale(), OBLocale::SetLocale(), and


OBLocale::~OBLocale().

The documentation for this class was generated from the following files:

• locale.h
• locale.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

Constructor & Destructor Documentation 578


Open Babel: API Documentation
• Classes
• Files

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

Member Data Documentation 579


OBMatrixData Member List
This is the complete list of members for OBMatrixData, including all inherited members.

_attr OBGenericData [protected]


_matrix OBMatrixData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBMatrixData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() const OBMatrixData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBMatrixData() OBMatrixData [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(matrix3x3 data) OBMatrixData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]
[inline,
~OBMatrixData() OBMatrixData
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.

OBMatrixData Member List 580


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

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

OpenBabel::OBMatrixData

OBMatrixData Member List 581


OBMatrixData Class Reference
Used to hold a 3x3 matrix item (e.g., a quadrupole moment). More...

#include <openbabel/generic.h>

Inheritance diagram for OBMatrixData:

[legend]

List of all members.

Public Member Functions


OBMatrixData ()
virtual ~OBMatrixData ()
virtual OBGenericData * Clone (OBBase *) const
void SetData (matrix3x3 data)
matrix3x3 GetData () 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
matrix3x3 _matrix
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to hold a 3x3 matrix item (e.g., a quadrupole moment).

Since:
version 2.2

OBMatrixData Class Reference 582


Open Babel: API Documentation

Constructor & Destructor Documentation

OBMatrixData ( ) [inline]

virtual ~OBMatrixData ( ) [inline, virtual]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetData ( matrix3x3 data ) [inline]

const
matrix3x3 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().

[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().

Constructor & Destructor Documentation 583


Open Babel: API Documentation

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

matrix3x3 _matrix [protected]


3x3 matrix to be stored

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:

• generic.h

Member Function Documentation 584


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 585


OBMessageHandler Member List
This is the complete list of members for OBMessageHandler, including all inherited members.

_filterStreamBuf OBMessageHandler [protected]


_inWrapStreamBuf OBMessageHandler [protected]
_logging OBMessageHandler [protected]
_maxEntries OBMessageHandler [protected]
_messageCount OBMessageHandler [protected]
_messageList OBMessageHandler [protected]
_outputLevel OBMessageHandler [protected]
_outputStream OBMessageHandler [protected]
ClearLog() OBMessageHandler [inline]
GetAuditMessageCount() OBMessageHandler [inline]
GetDebugMessageCount() OBMessageHandler [inline]
GetErrorMessageCount() OBMessageHandler [inline]
GetInfoMessageCount() OBMessageHandler [inline]
GetMaxLogEntries() OBMessageHandler [inline]
GetMessagesOfLevel(const obMessageLevel) OBMessageHandler
GetMessageSummary() OBMessageHandler
GetOutputLevel() OBMessageHandler [inline]
GetOutputStream() OBMessageHandler [inline]
GetWarningMessageCount() OBMessageHandler [inline]
OBMessageHandler() OBMessageHandler
SetMaxLogEntries(unsigned int max) OBMessageHandler [inline]
SetOutputLevel(const obMessageLevel level) OBMessageHandler [inline]
SetOutputStream(std::ostream *os) OBMessageHandler [inline]
StartErrorWrap() OBMessageHandler
StartLogging() OBMessageHandler [inline]
StopErrorWrap() OBMessageHandler
StopLogging() OBMessageHandler [inline]
ThrowError(OBError err, errorQualifier qqualifier=always) OBMessageHandler
ThrowError(const std::string &method, const std::string &errorMsg,
OBMessageHandler
obMessageLevel level=obDebug, errorQualifier qualifier=always)
~OBMessageHandler() OBMessageHandler

OBMessageHandler Member List 586


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::OBMessageHandler

OBMessageHandler Member List 587


OBMessageHandler Class Reference
Handle error messages, warnings, debugging information and the like. More...

#include <openbabel/oberror.h>

List of all members.

Public Member Functions


OBMessageHandler ()
~OBMessageHandler ()
void ThrowError (OBError err, errorQualifier qqualifier=always)
void ThrowError (const std::string &method, const std::string &errorMsg,
obMessageLevel level=obDebug, errorQualifier qualifier=always)
std::vector< std::string > GetMessagesOfLevel (const obMessageLevel)
void StartLogging ()
void StopLogging ()
void SetMaxLogEntries (unsigned int max)
unsigned int GetMaxLogEntries ()
void ClearLog ()
void SetOutputLevel (const obMessageLevel level)
obMessageLevel GetOutputLevel ()
void SetOutputStream (std::ostream *os)
std::ostream * GetOutputStream ()
bool StartErrorWrap ()
bool StopErrorWrap ()
unsigned int GetErrorMessageCount ()
unsigned int GetWarningMessageCount ()
unsigned int GetInfoMessageCount ()
unsigned int GetAuditMessageCount ()
unsigned int GetDebugMessageCount ()
std::string GetMessageSummary ()

Protected Attributes
unsigned int _messageCount [5]
std::deque< OBError > _messageList
obMessageLevel _outputLevel
std::ostream * _outputStream
bool _logging
unsigned int _maxEntries
std::streambuf * _inWrapStreamBuf
std::streambuf * _filterStreamBuf

OBMessageHandler Class Reference 588


Open Babel: API Documentation

Detailed Description
Handle error messages, warnings, debugging information and the like.

OBMessageHandler represents a configurable error system for Open Babel.

A global error log is defined by the Open Babel library for use of internal code as well as code built on top of
Open Babel. This class allows flexible filtering based on urgency (defined by the obMessageLevel type), an
"audit log" of molecular changes, including recall using the GetMessagesOfLevel method, etc.

The default is to only log and output errors of priority obMessageLevel::obError or


obMessageLevel::obWarning.

Long-running code may wish to set the size of the in-memory error log using the StartLogging / StopLogging
methods and SetMaxLogEntries. Otherwise, the error log may easily fill up, requiring large amounts of
memory.

If you wish to divert error output to a different std::ostream (i.e., for graphical display, or a file log), use the
SetOutputStream method -- the default goes to the std::clog stream. Furthermore, some older code uses
std::cerr for direct error output, rather than the ThrowError() methods in this class. To prevent this, you can
turn on "error wrapping" using the StartErrorWrap method -- this behavior is turned off by default.

To make it easy to use the OBMessageHandler class and error logging facilities, a global log is defined:

OBERROR extern OBMessageHandler obErrorLog;

Therefore, it is very easy to log errors:

if (atomIndex < 1 || atomIndex > mol.NumAtoms() )


obErrorLog.ThrowError(__FUNCTION__, "Requested Atom Out of Range", obDebug);

or

stringstream errorMsg;
errorMsg << " Could not parse line in type translation table types.txt -- incorect number of
errorMsg << " found " << vc.size() << " expected " << _ncols << ".";
obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obInfo);

The __FUNCTION__ builtin is defined by many compilers (e.g., GCC) but can be defined to an empty string
on some platforms without this compiler extension.

Output from the error log typically looks like:

==============================
Open Babel Audit Log in ReadChemObject
OpenBabel::Read molecule Protein Data Bank format
==============================
Open Babel Information in ParseConectRecord
WARNING: Problems reading a PDB file
Problems reading a CONECT record.
According to the PDB specification,
the record should have 70 columns, but OpenBabel found 61 columns.

Detailed Description 589


Open Babel: API Documentation

Constructor & Destructor Documentation

OBMessageHandler ( )

~OBMessageHandler ( )

Member Function Documentation

void ThrowError ( OBError err,


errorQualifier qqualifier = always
)
Throw an error with an already-formatted OBError object.

Referenced by FastSearchIndexer::Add(), OBChiralData::AddAtomRef(), OBMol::AddBond(),


OBConversion::AddChemObject(), OBMol::AddHydrogens(), OBDescriptor::AddProperties(),
OBMol::Align(), OpenBabel::AllocateByteCode(), OBChemTsfm::Apply(), patty::assign_types(),
OBAromaticTyper::AssignAromaticFlags(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBGastChrg::AssignPartialCharges(),
OBMol::AssignSpinMultiplicity(), OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(),
OpenBabel::CalcSignedVolume(), OpenBabel::CartesianToInternal(), OBMol::Center(),
OBConversion::CheckForUnintendedBatch(), FptIndex::CheckFP(), OBMol::Clear(),
OBDescriptor::Compare(), OBDescriptor::CompareStringWithFilter(), OBMol::ConnectTheDots(),
OBConversion::Convert(), OBMol::ConvertDativeBonds(), OpenBabel::CorrectBadResonanceForm(),
OBPhModel::CorrectForPH(), OBMol::CorrectForPH(), OBMoleculeFormat::DeferMolOutput(),
OBMol::DeleteHydrogens(), OBMol::DeleteNonPolarHydrogens(), OBMol::DoTransformations(),
OBMol::EndModify(), OBMol::expand_kekulize(), OpenBabel::FatalAllocationError(),
OpenBabel::FatalMemoryError(), OBDescriptor::FilterCompare(), SpaceGroup::Find(), FastSearch::Find(),
OBMol::FindChiralCenters(), OBMol::FindRingAtomsAndBonds(), OBRotorList::FindRotors(),
OBMol::FindSSSR(), OBFingerprint::Fold(), OBBitVec::FromString(), OBConversion::FullConvert(),
OpenBabel::GenerateByteCodes(), OBMol::GetAtom(), OBChiralData::GetAtom4Refs(),
OpenBabel::GetAtomIDNumber(), OBChiralData::GetAtomRef(), OBMol::GetBond(),
OBMol::GetFormula(), OBMol::GetResidue(), OBRotorRules::GetRotorIncrements(),
OBChiralData::GetSize(), OBMol::GetTotalCharge(), OBMol::GetTotalSpinMultiplicity(),
OBDescriptor::GetValues(), OBAtom::HtoMethyl(), OBGlobalDataBase::Init(),
OpenBabel::InternalToCartesian(), OBBond::IsClosure(), OBMol::Kekulize(),
OBConversion::LoadFormatFiles(), OBBuilder::LoadFragments(),
OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewPerceiveKekuleBonds(),
OBConversion::OpenAndSetFormat(), OBConversion::OpenInAndOutFiles(), OpenBabel::operator>>(),
OBMoleculeFormat::OutputDeferredMols(), OBAromaticTyper::ParseLine(), OBRingTyper::ParseLine(),
OBAtomTyper::ParseLine(), OBRotorRules::ParseLine(), OBPhModel::ParseLine(),
OBTypeTable::ParseLine(), OBIsotopeTable::ParseLine(), OBBondTyper::ParseLine(),
OBMol::PerceiveBondOrders(), OBChainsParser::PerceiveChains(), patty::read_rules(),
OBMoleculeFormat::ReadChemObjectImpl(), OBConversion::ReadFile(),
OBMoleculeFormat::ReadNameIndex(), OBDescriptor::ReadStringFromFilter(),
OBConversion::RegisterOptionParam(), OBRotorList::RemoveSymVals(), OBMol::RenumberAtoms(),
OBMol::Rotate(), OpenBabel::SafeOpen(), OBChiralData::SetAtom4Refs(), OBTypeTable::SetFromType(),

Constructor & Destructor Documentation 590


Open Babel: API Documentation

OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBMol::SetTorsion(), OBTypeTable::SetToType(),


OBRotorList::Setup(), OpenBabel::SMARTSError(), OBMol::start_kekulize(), OBMol::StripSalts(),
obLogBuf::sync(), OpenBabel::ThrowError(), OBMessageHandler::ThrowError(),
OBMol::ToInertialFrame(), OBMol::Translate(), OBTypeTable::Translate(), patty::type_to_int(),
OBMoleculeFormat::WriteChemObjectImpl(), OBConversion::WriteFile(), and
FastSearchIndexer::~FastSearchIndexer().

void ThrowError ( const std::string & method,


const std::string & errorMsg,
obMessageLevel level = obDebug,
errorQualifier qualifier = always
)
Throw an error in the specified method with an appropriate level.

std::vector< std::string > GetMessagesOfLevel ( const obMessageLevel level )

Returns:
all messages matching a specified level

void StartLogging ( ) [inline]


Start logging messages (default).

void StopLogging ( ) [inline]


Stop logging messages completely.

void SetMaxLogEntries ( unsigned int max ) [inline]


Set the maximum number of entries (or 0 for no limit).

unsigned int GetMaxLogEntries ( ) [inline]

Returns:
the current maximum number of entries (default = 0 for no limit)

void ClearLog ( ) [inline]


Clear the current message log entirely.

Referenced by OBConversion::FullConvert().

void SetOutputLevel ( const obMessageLevel level ) [inline]


Set the level of messages to output (i.e., messages with at least this priority will be output).

Member Function Documentation 591


Open Babel: API Documentation

obMessageLevel GetOutputLevel ( ) [inline]

Returns:
the current output level

void SetOutputStream ( std::ostream * os ) [inline]

std::ostream* GetOutputStream ( ) [inline]

bool StartErrorWrap ( )
Start "wrapping" messages to cerr into ThrowError calls.

bool StopErrorWrap ( )
Turn off "wrapping" messages, restoring normal cerr use (default).

Referenced by OBMessageHandler::~OBMessageHandler().

unsigned int GetErrorMessageCount ( ) [inline]

Returns:
Count of messages received at the obError level

unsigned int GetWarningMessageCount ( ) [inline]

Returns:
Count of messages received at the obWarning level

unsigned int GetInfoMessageCount ( ) [inline]

Returns:
Count of messages received at the obInfo level

unsigned int GetAuditMessageCount ( ) [inline]

Returns:
Count of messages received at the obAuditMsg level

unsigned int GetDebugMessageCount ( ) [inline]

Returns:

Member Function Documentation 592


Open Babel: API Documentation

Count of messages received at the obDebug level

string GetMessageSummary ( )

Returns:
Summary of messages received at all levels

Member Data Documentation

unsigned int _messageCount[5] [protected]


Count of messages at each message level.

Referenced by OBMessageHandler::GetMessageSummary(), OBMessageHandler::OBMessageHandler(), and


OBMessageHandler::ThrowError().

std::deque<OBError> _messageList [protected]


Log of messages for later retrieval via GetMessagesOfLevel().

Referenced by OBMessageHandler::GetMessagesOfLevel(), and OBMessageHandler::ThrowError().

obMessageLevel _outputLevel [protected]


Filtering level for messages and logging (messages of lower priority will be ignored.

Referenced by OBMessageHandler::ThrowError().

std::ostream* _outputStream [protected]

Referenced by OBMessageHandler::ThrowError().

bool _logging [protected]


Whether messages will be logged into _messageList.

Referenced by OBMessageHandler::ThrowError().

unsigned int _maxEntries [protected]


The maximum size of _messageList log.

Referenced by OBMessageHandler::ThrowError().

std::streambuf* _inWrapStreamBuf [protected]

Member Data Documentation 593


Open Babel: API Documentation

The default stream buffer for the output stream (saved if wrapping is ued).

Referenced by OBMessageHandler::StartErrorWrap(), and OBMessageHandler::StopErrorWrap().

std::streambuf* _filterStreamBuf [protected]


The filtered obLogBuf stream buffer to wrap error messages.

Referenced by OBMessageHandler::StartErrorWrap(), and OBMessageHandler::~OBMessageHandler().

The documentation for this class was generated from the following files:

• oberror.h
• oberror.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 594


OBMol Member List
This is the complete list of members for OBMol, including all inherited members.

_autoFormalCharge OBMol [protected]


_autoPartialCharge OBMol [protected]
_c OBMol [protected]
_dimension OBMol [protected]
_energy OBMol [protected]
_flags OBMol [protected]
_internals OBMol [protected]
_mod OBMol [protected]
_natoms OBMol [protected]
_nbonds OBMol [protected]
_residue OBMol [protected]
_title OBMol [protected]
_totalCharge OBMol [protected]
_totalSpin OBMol [protected]
_vatom OBMol [protected]
_vbond OBMol [protected]
_vconf OBMol [protected]
_vdata OBBase [protected]
AddAtom(OBAtom &) OBMol
AddBond(int beginIdx, int endIdx, int order, int flags=0, int insertpos=-1) OBMol
AddBond(OBBond &) OBMol
AddConformer(double *f) OBMol [inline]
AddHydrogens(bool polaronly=false, bool correctForPH=false, double pH=7.4) OBMol
AddHydrogens(OBAtom *) OBMol
AddPolarHydrogens() OBMol
AddResidue(OBResidue &) OBMol
Align(OBAtom *, OBAtom *, vector3 &, vector3 &) OBMol
AssignSpinMultiplicity(bool NoImplicitH=false) OBMol
AutomaticFormalCharge() OBMol [inline]
AutomaticPartialCharge() OBMol [inline]
BeginAtom(OBAtomIterator &i) OBMol
BeginAtoms() OBMol [inline]
BeginBond(OBBondIterator &i) OBMol
BeginBonds() OBMol [inline]
BeginConformer(std::vector< double * >::iterator &i) OBMol [inline]
BeginData() OBBase [inline]
BeginInternalCoord(std::vector< OBInternalCoord * >::iterator &i) OBMol [inline]
BeginModify(void) OBMol [virtual]

OBMol Member List 595


Open Babel: API Documentation

BeginResidue(OBResidueIterator &i) OBMol [inline]


BeginResidues() OBMol [inline]
CastAndClear(bool clear=true) OBBase [inline]
Center() OBMol
Center(int nconf) OBMol
ClassDescription() OBMol [static]
Clear() OBMol [virtual]
CloneData(OBGenericData *d) OBBase
ConnectTheDots() OBMol
ContigFragList(std::vector< std::vector< int > > &) OBMol
ConvertDativeBonds() OBMol
CopyConformer(double *c, int nconf) OBMol
CorrectForPH(double pH=7.4) OBMol
CreateAtom(void) OBMol [virtual]
CreateBond(void) OBMol [virtual]
CreateResidue(void) OBMol [virtual]
DataSize() const OBBase [inline]
DecrementMod() OBMol [inline]
DeleteAtom(OBAtom *, bool destroyAtom=true) OBMol
DeleteBond(OBBond *, bool destroyBond=true) OBMol
DeleteConformer(int nconf) OBMol
DeleteData(unsigned int type) OBBase
DeleteData(OBGenericData *) OBBase
DeleteData(std::vector< OBGenericData * > &) OBBase
DeleteData(const std::string &s) OBBase
DeleteHydrogen(OBAtom *) OBMol
DeleteHydrogens() OBMol
DeleteHydrogens(OBAtom *) OBMol
DeleteNonPolarHydrogens() OBMol
DeleteResidue(OBResidue *, bool destroyResidue=true) OBMol
DestroyAtom(OBAtom *) OBMol [virtual]
DestroyBond(OBBond *) OBMol [virtual]
DestroyResidue(OBResidue *) OBMol [virtual]
DoTransformations(const std::map< std::string, std::string > *pOptions) OBMol [virtual]
Empty() OBMol [inline]
EndAtoms() OBMol [inline]
EndBonds() OBMol [inline]
EndData() OBBase [inline]
EndModify(bool nukePerceivedData=true) OBMol [virtual]
EndResidues() OBMol [inline]
expand_kekulize(OBAtom *atom1, OBAtom *atom2, std::vector< int > OBMol [protected]
&currentState, std::vector< int > &initState, std::vector< int > &bcurrentState,

OBMol Member List 596


Open Babel: API Documentation

std::vector< int > &binitState, std::vector< bool > &mark)


expandcycle(OBAtom *atom, OBBitVec &avisit, OBAtom *first=NULL, int
OBMol [protected]
depth=0)
FindAngles() OBMol
FindChildren(std::vector< int > &children, int bgnIdx, int endIdx) OBMol
FindChildren(std::vector< OBAtom * > &children, OBAtom *bgn, OBAtom
OBMol
*end)
FindChiralCenters() OBMol
FindLargestFragment(OBBitVec &frag) OBMol
FindRingAtomsAndBonds() OBMol
FindSSSR() OBMol
FindTorsions() OBMol
GetAllData(const unsigned int type) OBBase
GetAngle(OBAtom *a, OBAtom *b, OBAtom *c) OBMol
GetAtom(int idx) const OBMol
GetBond(int idx) const OBMol
GetBond(int a, int b) const OBMol
GetBond(OBAtom *bgn, OBAtom *end) const OBMol
GetConformer(int i) OBMol [inline]
GetConformers() OBMol [inline]
GetCoordinates() OBMol [inline]
GetData(const unsigned int type) OBBase
GetData(const std::string &) OBBase
GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
GetDimension() const OBMol [inline]
GetEnergies() OBMol
GetEnergy() const OBMol [inline]
GetEnergy(int ci) OBMol
GetExactMass(bool implicitH=true) OBMol
GetFirstAtom() const OBMol
GetFlags() OBMol [inline]
GetFormula() OBMol
GetGIDVector(std::vector< unsigned int > &) OBMol
GetGIVector(std::vector< unsigned int > &) OBMol
GetGTDVector(std::vector< int > &) OBMol
GetInternalCoord() OBMol
GetMod() OBMol [inline]
GetMolWt(bool implicitH=true) OBMol
GetNextFragment(OpenBabel::OBMolAtomDFSIter &iter, OBMol &newMol) OBMol
getorden(OBAtom *atom) OBMol [protected]

OBMol Member List 597


Open Babel: API Documentation

GetResidue(int idx) const OBMol


GetSpacedFormula(int ones=0, const char *sp=" ", bool implicitH=true) OBMol
GetSSSR() OBMol
GetTitle(bool replaceNewlines=true) const OBMol
GetTorsion(int, int, int, int) OBMol
GetTorsion(OBAtom *a, OBAtom *b, OBAtom *c, OBAtom *d) OBMol
GetTotalCharge() OBMol
GetTotalSpinMultiplicity() OBMol
Has2D() OBMol
Has3D() OBMol
HasAromaticCorrected() OBMol [inline]
HasAromaticPerceived() OBMol [inline]
HasAtomTypesPerceived() OBMol [inline]
HasChainsPerceived() OBMol [inline]
HasChiralityPerceived() OBMol [inline]
HasClosureBondsPerceived() OBMol [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
[inline,
HasFlag(int flag) OBMol
protected]
HasHybridizationPerceived() OBMol [inline]
HasHydrogensAdded() OBMol [inline]
HasImplicitValencePerceived() OBMol [inline]
HasKekulePerceived() OBMol [inline]
HasNonZeroCoords() OBMol
HasPartialChargesPerceived() OBMol [inline]
HasRingAtomsAndBondsPerceived() OBMol [inline]
HasRingTypesPerceived() OBMol [inline]
HasSpinMultiplicityAssigned() OBMol [inline]
HasSSSRPerceived() OBMol [inline]
IncrementMod() OBMol [inline]
InsertAtom(OBAtom &) OBMol
IsChiral() OBMol
IsCorrectedForPH() OBMol [inline]
Kekulize() OBMol
NewAtom() OBMol
NewBond() OBMol
NewPerceiveKekuleBonds() OBMol
NewResidue() OBMol
NextAtom(OBAtomIterator &i) OBMol
NextBond(OBBondIterator &i) OBMol

OBMol Member List 598


Open Babel: API Documentation

NextConformer(std::vector< double * >::iterator &i) OBMol [inline]


NextInternalCoord(std::vector< OBInternalCoord * >::iterator &i) OBMol [inline]
NextResidue(OBResidueIterator &i) OBMol [inline]
NumAtoms() const OBMol [inline]
NumBonds() const OBMol [inline]
NumConformers() OBMol [inline]
NumHvyAtoms() OBMol
NumResidues() const OBMol [inline]
NumRotors() OBMol
OBMol() OBMol
OBMol(const OBMol &) OBMol
operator+=(const OBMol &mol) OBMol
operator=(const OBMol &mol) OBMol
PerceiveBondOrders() OBMol
PerceiveKekuleBonds() OBMol
RenumberAtoms(std::vector< OBAtom * > &) OBMol
ReserveAtoms(int natoms) OBMol [inline]
Rotate(const double u[3][3]) OBMol
Rotate(const double m[9]) OBMol
Rotate(const double m[9], int nconf) OBMol
Separate(int StartIndex=1) OBMol
SetAromaticCorrected() OBMol [inline]
SetAromaticPerceived() OBMol [inline]
SetAtomTypesPerceived() OBMol [inline]
SetAutomaticFormalCharge(bool val) OBMol [inline]
SetAutomaticPartialCharge(bool val) OBMol [inline]
SetChainsPerceived() OBMol [inline]
SetChiralityPerceived() OBMol [inline]
SetClosureBondsPerceived() OBMol [inline]
SetConformer(int i) OBMol
SetConformers(std::vector< double * > &v) OBMol
SetCoordinates(double *c) OBMol
SetCorrectedForPH() OBMol [inline]
SetData(OBGenericData *d) OBBase [inline]
SetDimension(unsigned short int d) OBMol [inline]
SetEnergies(std::vector< double > &energies) OBMol
SetEnergy(double energy) OBMol [inline]
[inline,
SetFlag(int flag) OBMol
protected]
SetFlags(int flags) OBMol [inline]
SetFormula(std::string molFormula) OBMol
SetHybridizationPerceived() OBMol [inline]

OBMol Member List 599


Open Babel: API Documentation

SetHydrogensAdded() OBMol [inline]


SetImplicitValencePerceived() OBMol [inline]
SetInternalCoord(std::vector< OBInternalCoord * > int_coord) OBMol [inline]
SetKekulePerceived() OBMol [inline]
SetPartialChargesPerceived() OBMol [inline]
SetRingAtomsAndBondsPerceived() OBMol [inline]
SetRingTypesPerceived() OBMol [inline]
SetSpinMultiplicityAssigned() OBMol [inline]
SetSSSRPerceived() OBMol [inline]
SetTitle(const char *title) OBMol
SetTitle(std::string &title) OBMol
SetTorsion(OBAtom *, OBAtom *, OBAtom *, OBAtom *, double ang) OBMol
SetTotalCharge(int charge) OBMol
SetTotalSpinMultiplicity(unsigned int spinMultiplicity) OBMol
start_kekulize(std::vector< OBAtom * > &cycle, std::vector< int > &electron) OBMol [protected]
StripSalts(int threshold) OBMol
ToInertialFrame(int conf, double *rmat) OBMol
ToInertialFrame() OBMol
Translate(const vector3 &v) OBMol
Translate(const vector3 &v, int conf) OBMol
UnsetAromaticPerceived() OBMol [inline]
UnsetFlag(int flag) OBMol [inline]
UnsetHydrogensAdded() OBMol [inline]
UnsetImplicitValencePerceived() OBMol [inline]
UnsetPartialChargesPerceived() OBMol [inline]
UnsetRingTypesPerceived() OBMol [inline]
UnsetSSSRPerceived() OBMol [inline]
[inline,
~OBBase() OBBase
virtual]
~OBMol() OBMol [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:

OBMol Member List 600


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

OpenBabel::OBMol

OBMol Member List 601


OBMol Class Reference
Molecule Class. More...

#include <openbabel/mol.h>

Inheritance diagram for OBMol:

[legend]

List of all members.

Molecule modification methods


virtual OBBase * DoTransformations (const std::map< std::string, std::string > *pOptions)
bool Clear ()
void RenumberAtoms (std::vector< OBAtom * > &)
void SetCoordinates (double *c)
void ToInertialFrame (int conf, double *rmat)
void ToInertialFrame ()
void Translate (const vector3 &v)
void Translate (const vector3 &v, int conf)
void Rotate (const double u[3][3])
void Rotate (const double m[9])
void Rotate (const double m[9], int nconf)
void Center ()
bool Kekulize ()
bool PerceiveKekuleBonds ()
void NewPerceiveKekuleBonds ()
bool DeleteHydrogens ()
bool DeleteHydrogens (OBAtom *)
bool DeleteNonPolarHydrogens ()
bool DeleteHydrogen (OBAtom *)
bool AddHydrogens (bool polaronly=false, bool correctForPH=false, double
pH=7.4)
bool AddHydrogens (OBAtom *)
bool AddPolarHydrogens ()
bool StripSalts (int threshold)
std::vector< OBMol > Separate (int StartIndex=1)
bool GetNextFragment (OpenBabel::OBMolAtomDFSIter &iter, OBMol
&newMol)
bool ConvertDativeBonds ()
bool CorrectForPH (double pH=7.4)

OBMol Class Reference 602


Open Babel: API Documentation

bool AssignSpinMultiplicity (bool NoImplicitH=false)


vector3 Center (int nconf)
void SetTorsion (OBAtom *, OBAtom *, OBAtom *, OBAtom *, double ang)
static const char * ClassDescription ()

Public Member Functions


template<class T>
T * CastAndClear (bool clear=true)
Initialization and data (re)size methods
OBMol ()
OBMol (const OBMol &)
virtual ~OBMol ()
OBMol & operator= (const OBMol &mol)
OBMol & operator+= (const OBMol &mol)
void ReserveAtoms (int natoms)
virtual OBAtom * CreateAtom (void)
virtual OBBond * CreateBond (void)
virtual OBResidue * CreateResidue (void)
virtual void DestroyAtom (OBAtom *)
virtual void DestroyBond (OBBond *)
virtual void DestroyResidue (OBResidue *)
bool AddAtom (OBAtom &)
bool InsertAtom (OBAtom &)
bool AddBond (int beginIdx, int endIdx, int order, int flags=0, int
insertpos=-1)
bool AddBond (OBBond &)
bool AddResidue (OBResidue &)
OBAtom * NewAtom ()
OBBond * NewBond ()
OBResidue * NewResidue ()
bool DeleteAtom (OBAtom *, bool destroyAtom=true)
bool DeleteBond (OBBond *, bool destroyBond=true)
bool DeleteResidue (OBResidue *, bool destroyResidue=true)
Molecule modification methods
virtual void BeginModify (void)
virtual void EndModify (bool nukePerceivedData=true)
int GetMod ()
void IncrementMod ()
void DecrementMod ()
Data retrieval methods
int GetFlags ()
const char * GetTitle (bool replaceNewlines=true) const
unsigned int NumAtoms () const
unsigned int NumBonds () const
unsigned int NumHvyAtoms ()
unsigned int NumResidues () const
unsigned int NumRotors ()
OBAtom * GetAtom (int idx) const
OBAtom * GetFirstAtom () const

Molecule modification methods 603


Open Babel: API Documentation
OBBond * GetBond (int idx) const
OBBond * GetBond (int a, int b) const
OBBond * GetBond (OBAtom *bgn, OBAtom *end) const
OBResidue * GetResidue (int idx) const
std::vector< OBInternalCoord * > GetInternalCoord ()
double GetTorsion (int, int, int, int)
double GetTorsion (OBAtom *a, OBAtom *b, OBAtom *c, OBAtom *d)
double GetAngle (OBAtom *a, OBAtom *b, OBAtom *c)
std::string GetFormula ()
std::string GetSpacedFormula (int ones=0, const char *sp=" ", bool implicitH=true)
double GetEnergy () const
double GetMolWt (bool implicitH=true)
double GetExactMass (bool implicitH=true)
int GetTotalCharge ()
unsigned int GetTotalSpinMultiplicity ()
unsigned short int GetDimension () const
double * GetCoordinates ()
std::vector< OBRing * > & GetSSSR ()
bool AutomaticFormalCharge ()
bool AutomaticPartialCharge ()
Data modification methods
void SetTitle (const char *title)
void SetTitle (std::string &title)
void SetFormula (std::string molFormula)
void SetEnergy (double energy)
void SetDimension (unsigned short int d)
void SetTotalCharge (int charge)
void SetTotalSpinMultiplicity (unsigned int spinMultiplicity)
void SetInternalCoord (std::vector< OBInternalCoord * > int_coord)
void SetAutomaticFormalCharge (bool val)
void SetAutomaticPartialCharge (bool val)
void SetAromaticPerceived ()
void SetSSSRPerceived ()
void SetRingAtomsAndBondsPerceived ()
void SetAtomTypesPerceived ()
void SetRingTypesPerceived ()
void SetChainsPerceived ()
void SetChiralityPerceived ()
void SetPartialChargesPerceived ()
void SetHybridizationPerceived ()
void SetImplicitValencePerceived ()
void SetKekulePerceived ()
void SetClosureBondsPerceived ()
void SetHydrogensAdded ()
void SetCorrectedForPH ()
void SetAromaticCorrected ()
void SetSpinMultiplicityAssigned ()
void SetFlags (int flags)
void UnsetAromaticPerceived ()
void UnsetSSSRPerceived ()
void UnsetRingTypesPerceived ()

Public Member Functions 604


Open Babel: API Documentation
void UnsetPartialChargesPerceived ()
void UnsetImplicitValencePerceived ()
void UnsetHydrogensAdded ()
void UnsetFlag (int flag)
Molecule utilities and perception methods
void FindSSSR ()
void FindRingAtomsAndBonds ()
void FindChiralCenters ()
void FindChildren (std::vector< int > &children, int bgnIdx, int endIdx)
void FindChildren (std::vector< OBAtom * > &children, OBAtom *bgn,
OBAtom *end)
void FindLargestFragment (OBBitVec &frag)
void ContigFragList (std::vector< std::vector< int > > &)
void Align (OBAtom *, OBAtom *, vector3 &, vector3 &)
void ConnectTheDots ()
void PerceiveBondOrders ()
void FindAngles ()
void FindTorsions ()
bool GetGTDVector (std::vector< int > &)
void GetGIVector (std::vector< unsigned int > &)
void GetGIDVector (std::vector< unsigned int > &)
Methods to check for existence of properties
bool Has2D ()
bool Has3D ()
bool HasNonZeroCoords ()
bool HasAromaticPerceived ()
bool HasSSSRPerceived ()
bool HasRingAtomsAndBondsPerceived ()
bool HasAtomTypesPerceived ()
bool HasRingTypesPerceived ()
bool HasChiralityPerceived ()
bool HasPartialChargesPerceived ()
bool HasHybridizationPerceived ()
bool HasImplicitValencePerceived ()
bool HasKekulePerceived ()
bool HasClosureBondsPerceived ()
bool HasChainsPerceived ()
bool HasHydrogensAdded ()
bool HasAromaticCorrected ()
bool IsCorrectedForPH ()
bool HasSpinMultiplicityAssigned ()
bool IsChiral ()
bool Empty ()
Multiple conformer member functions
int NumConformers ()
void SetConformers (std::vector< double * > &v)
void AddConformer (double *f)
void SetConformer (int i)
void CopyConformer (double *c, int nconf)
void DeleteConformer (int nconf)
double * GetConformer (int i)

Public Member Functions 605


Open Babel: API Documentation
void SetEnergies (std::vector< double > &energies)
std::vector< double > GetEnergies ()
double GetEnergy (int ci)
double * BeginConformer (std::vector< double * >::iterator &i)
double * NextConformer (std::vector< double * >::iterator &i)
std::vector< double * > & GetConformers ()
Iterator methods
OBAtomIterator BeginAtoms ()
OBAtomIterator EndAtoms ()
OBBondIterator BeginBonds ()
OBBondIterator EndBonds ()
OBResidueIterator BeginResidues ()
OBResidueIterator EndResidues ()
OBAtom * BeginAtom (OBAtomIterator &i)
OBAtom * NextAtom (OBAtomIterator &i)
OBBond * BeginBond (OBBondIterator &i)
OBBond * NextBond (OBBondIterator &i)
OBResidue * BeginResidue (OBResidueIterator &i)
OBResidue * NextResidue (OBResidueIterator &i)
OBInternalCoord * BeginInternalCoord (std::vector< OBInternalCoord * >::iterator &i)
OBInternalCoord * NextInternalCoord (std::vector< OBInternalCoord * >::iterator &i)
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 ()

Protected Member Functions


bool HasFlag (int flag)
void SetFlag (int flag)
Internal Kekulization routines -- see kekulize.cpp and NewPerceiveKekuleBonds()
void start_kekulize (std::vector< OBAtom * > &cycle, std::vector< int >
&electron)
int expand_kekulize (OBAtom *atom1, OBAtom *atom2, std::vector< int >
&currentState, std::vector< int > &initState, std::vector< int >

Protected Member Functions 606


Open Babel: API Documentation
&bcurrentState, std::vector< int > &binitState, std::vector< bool >
&mark)
int getorden (OBAtom *atom)
bool expandcycle (OBAtom *atom, OBBitVec &avisit, OBAtom
*first=NULL, int depth=0)

Protected Attributes
int _flags
bool _autoPartialCharge
bool _autoFormalCharge
std::string _title
std::vector< OBAtom * > _vatom
std::vector< OBBond * > _vbond
unsigned short int _dimension
int _totalCharge
unsigned int _totalSpin
double * _c
std::vector< double * > _vconf
double _energy
unsigned int _natoms
unsigned int _nbonds
std::vector< OBResidue * > _residue
std::vector< OBInternalCoord * > _internals
unsigned short int _mod
std::vector< OBGenericData * > _vdata

Detailed Description
Molecule Class.

The most important class in Open Babel is OBMol, or the molecule class. The OBMol class is designed to
store all the basic information associated with a molecule, to make manipulations on the connection table of a
molecule facile, and to provide member functions which automatically perceive information about a molecule.
A guided tour of the OBMol class is a good place to start.

An OBMol class can be declared:

OBMol mol;

For example:

#include <iostream.h>

#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
int main(int argc,char **argv)
{
OBConversion conv(&cin,&cout);
if(conv.SetInAndOutFormats("SDF","MOL2"))

Protected Attributes 607


Open Babel: API Documentation
{
OBMol mol;
if(conv.Read(&mol))
...manipulate molecule

conv->Write(&mol);
}
return(1);
}

will read in a molecule in SD file format from stdin (or the C++ equivalent cin) and write a MOL2 format file
out to standard out. Additionally, The input and output formats can be altered using the OBConversion class

Once a molecule has been read into an OBMol (or created via other methods) the atoms and bonds can be
accessed by the following methods:

OBAtom *atom;
atom = mol.GetAtom(5); //random access of an atom

or

OBBond *bond;
bond = mol.GetBond(14); //random access of a bond

or

FOR_ATOMS_OF_MOL(atom, mol) // iterator access (see OBMolAtomIter)

or

FOR_BONDS_OF_MOL(bond, mol) // iterator access (see OBMolBondIter)

It is important to note that atom arrays currently begin at 1 and bond arrays begin at 0. Requesting atom 0 (

OBAtom *atom = mol.GetAtom(0);

will result in an error, but

OBBond *bond = mol.GetBond(0);

is perfectly valid. Note that this is expected to change in the near future to simplify coding and improve
efficiency.

The ambiguity of numbering issues and off-by-one errors led to the use of iterators in Open Babel. An iterator
is essentially just a pointer, but when used in conjunction with Standard Template Library (STL) vectors it
provides an unambiguous way to loop over arrays. OBMols store their atom and bond information in STL
vectors. Since vectors are template based, a vector of any user defined type can be declared. OBMols declare
vector<OBAtom*> and vector<OBBond*> to store atom and bond information. Iterators are then a natural
way to loop over the vectors of atoms and bonds.

A variety of predefined iterators have been created to simplify common looping requests (e.g., looping over
all atoms in a molecule, bonds to a given atom, etc.)

#include <openbabel/obiter.h>

Detailed Description 608


Open Babel: API Documentation
...
#define FOR_ATOMS_OF_MOL(a,m) for( OBMolAtomIter a(m); a; ++a )
#define FOR_BONDS_OF_MOL(b,m) for( OBMolBondIter b(m); b; ++b )
#define FOR_NBORS_OF_ATOM(a,p) for( OBAtomAtomIter a(p); a; ++a )
#define FOR_BONDS_OF_ATOM(b,p) for( OBAtomBondIter b(p); b; ++b )
#define FOR_RESIDUES_OF_MOL(r,m) for( OBResidueIter r(m); r; ++r )
#define FOR_ATOMS_OF_RESIDUE(a,r) for( OBResidueAtomIter a(r); a; ++a )
...

These convenience functions can be used like so:

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

OBMol mol;
double exactMass = 0.0;
FOR_ATOMS_OF_MOL(a, mol)
{
exactMass += a->GetExactMass();
}

Note that with these convenience macros, the iterator "a" (or whichever name you pick) is declared for you --
you do not need to do it beforehand.

Constructor & Destructor Documentation

OBMol ( )
Constructor.

OBMol ( const OBMol & mol )


Copy constructor, copies atoms,bonds and OBGenericData.

~OBMol ( ) [virtual]
Destructor.

Member Function Documentation

bool HasFlag ( int flag ) [inline, protected]

Referenced by OBMol::FindRingAtomsAndBonds(), OBMol::GetTotalCharge(), and


OBMol::GetTotalSpinMultiplicity().

void SetFlag ( int flag ) [inline, protected]

Referenced by OBMol::FindRingAtomsAndBonds(), OBMol::SetTotalCharge(), and


OBMol::SetTotalSpinMultiplicity().

Constructor & Destructor Documentation 609


Open Babel: API Documentation

void start_kekulize ( std::vector< OBAtom * > & cycle,


std::vector< int > & electron
) [protected]
Start kekulizing one or a fused set of aromatic ring(s).

The initial electronic state indicates if an atoms must make a double bond or not Kekulizing is attempted
recursively for all the atoms bonded to the first atom of the cycle.

Referenced by OBMol::NewPerceiveKekuleBonds().

int expand_kekulize ( OBAtom * atom1,


OBAtom * atom2,
std::vector< int > & currentState,
std::vector< int > & initState,
std::vector< int > & bcurrentState,
std::vector< int > & binitState,
std::vector< bool > & mark
) [protected]
recursively assign single and double bonds according to the electronical state of the atoms of the current bond

Referenced by OBMol::start_kekulize().

int getorden ( OBAtom * atom ) [protected]


Give the priority to give two electrons instead of 1.

Referenced by OBMol::NewPerceiveKekuleBonds().

bool expandcycle ( OBAtom * atom,


OBBitVec & avisit,
OBAtom * first = NULL,
int depth = 0
) [protected]
Recursively find the aromatic atoms with an aromatic bond to the current atom.

Referenced by OBMol::NewPerceiveKekuleBonds().

const
OBMol & operator= ( OBMol mol )
&
Assignment, copies atoms,bonds and OBGenericData.

OBMol & operator+= ( mol )

Member Function Documentation 610


Open Babel: API Documentation

const
OBMol
&
Copies atoms and bonds but not OBGenericData.

void ReserveAtoms ( int natoms ) [inline]


Reserve a minimum number of atoms for internal storage This improves performance since the internal atom
vector does not grow.

OBAtom * CreateAtom ( void ) [virtual]


Create a new OBAtom pointer. Does no bookkeeping

Deprecated:
Use NewAtom instead, which ensures internal connections

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

OBBond * CreateBond ( void ) [virtual]


Create a new OBBond pointer. Does no bookkeeping

Deprecated:
Use NewBond instead, which ensures internal connections

Referenced by OBMol::AddBond(), and OBMol::NewBond().

OBResidue * CreateResidue ( void ) [virtual]


Create a new OBResidue pointer. Does no bookkeeping

Deprecated:
Use NewResidue instead, which ensures internal connections

Referenced by OBMol::AddResidue(), and OBMol::NewResidue().

void DestroyAtom ( OBAtom * atom ) [virtual]


Free an OBAtom pointer if defined. Does no bookkeeping

See also:
DeleteAtom which ensures internal connections

Referenced by OBMol::Clear(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), and OBMol::~OBMol().

void DestroyBond ( OBBond * bond ) [virtual]


Free an OBBond pointer if defined. Does no bookkeeping

Member Function Documentation 611


Open Babel: API Documentation

See also:
DeleteBond which ensures internal connections

Referenced by OBMol::Clear(), OBMol::DeleteBond(), and OBMol::~OBMol().

void DestroyResidue ( OBResidue * residue ) [virtual]


Free an OBResidue pointer if defined. Does no bookkeeping

See also:
DeleteResidue which ensures internal connections

Referenced by OBMol::Clear(), OBMol::DeleteResidue(), and OBMol::~OBMol().

bool AddAtom ( OBAtom & atom )


Add an atom to a molecule.

Add the specified atom to this molecule

Returns:
Whether the method was successful

Also checks bond_queue for any bonds that should be made to the new atom

Referenced by OBMol::GetNextFragment(), OBMol::InsertAtom(), OBMol::operator+=(), and


OBMol::operator=().

OBAtom
bool InsertAtom ( atom )
&
Add a new atom to this molecule (like AddAtom) Calls BeginModify() before insertion and EndModify()
after insertion

bool AddBond ( int beginIdx,


int endIdx,
int order,
int flags = 0,
int insertpos = -1
)
Add a new bond to the molecule with the specified parameters

Parameters:
beginIdx the atom index of the "start" atom
endIdx the atom index of the "end" atom
order the bond order (see OBBond::GetBO())
flags any bond flags such as stereochemistry (default = none)

Member Function Documentation 612


Open Babel: API Documentation

insertpos the position index to insert the bond (default = none)

Returns:
Whether the new bond creation was successful

Referenced by OBMol::AddAtom(), OBMol::AddBond(), OBMol::AddHydrogens(),


OBResidueData::AssignBonds(), OBBuilder::Build(), OBMol::ConnectTheDots(), AliasData::Expand(),
OBMol::GetNextFragment(), OBAtom::HtoMethyl(), OBMol::NewAtom(), OBMol::operator+=(),
OBMol::operator=(), and OBAtom::SetHybAndGeom().

bool AddBond ( OBBond & bond )


Add the specified residue to this molecule and update connections

Returns:
Whether the method was successful

OBResidue
bool AddResidue ( residue )
&
Add the specified residue to this molecule and update connections

Returns:
Whether the method was successful

Referenced by OBMol::operator+=().

OBAtom * NewAtom ( )
Instantiate a New Atom and add it to the molecule.

Create a new OBAtom in this molecule and ensure connections. (e.g. OBAtom::GetParent()

Checks bond_queue for any bonds that should be made to the new atom and updates atom indexes.

Referenced by OBMol::AddHydrogens(), AliasData::Expand(), OBUnitCell::FillUnitCell(),


OBForceField::GetGrid(), OBAtom::HtoMethyl(), and OBAtom::SetHybAndGeom().

OBBond * NewBond ( )
Instantiate a New Bond and add it to the molecule.

Create a new OBBond in this molecule and ensure connections. (e.g. OBBond::GetParent()

Since:
version 2.1 Sets the proper Bond index and insures this molecule is set as the parent.

Referenced by OBBuilder::Connect().

Member Function Documentation 613


Open Babel: API Documentation

OBResidue * NewResidue ( )
Create a new OBResidue in this molecule and ensure connections.

Referenced by OBMol::operator=().

bool DeleteAtom ( OBAtom * atom,


bool destroyAtom = true
)
Deletes an atom from this molecule and all appropriate bonds. Updates the molecule and atom and bond
indexes accordingly.

Warning:
Does not update any residues which may contain this atom

Returns:
Whether deletion was successful

Referenced by OBChemTsfm::Apply(), OBMol::DeleteHydrogens(), OBMol::DeleteNonPolarHydrogens(),


OBForceField::GetGrid(), OpenBabel::InternalToCartesian(), OBAtom::SetHybAndGeom(), and
OBMol::StripSalts().

bool DeleteBond ( OBBond * bond,


bool destroyBond = true
)
Deletes an bond from this molecule and updates accordingly

Returns:
Whether deletion was successful

Referenced by OBBuilder::Build(), OBMol::ConnectTheDots(), OBMol::DeleteAtom(),


OBMol::DeleteHydrogen(), and OBBuilder::Swap().

bool DeleteResidue ( OBResidue * residue,


destroyResidue =
bool
true
)
Deletes a residue from this molecule and updates accordingly.

Returns:
Whether deletion was successful

void BeginModify ( void ) [virtual]


Call when making many modifications -- clears conformer/rotomer data. The method "turns off" perception
routines, improving performance. Changes in molecular structure will be re-considered after modifications.

Member Function Documentation 614


Open Babel: API Documentation

Referenced by OBMol::AddHydrogens(), OBMol::AddResidue(), OBMol::DeleteAtom(),


OBMol::DeleteBond(), OBForceField::GetGrid(), OBAtom::HtoMethyl(), OBMol::InsertAtom(),
OBMol::operator+=(), OBMol::operator=(), OBAtom::SetHybAndGeom(), and OBMol::StripSalts().

nukePerceivedData =
void EndModify ( bool ) [virtual]
true
Call when done with modificaions -- re-perceive data as needed. This method "turns on" perception routines
and re-evaluates molecular structure.

Referenced by OBMol::AddHydrogens(), OBMol::AddResidue(), OBMol::DeleteAtom(),


OBMol::DeleteBond(), OBForceField::GetGrid(), OBAtom::HtoMethyl(), OBMol::InsertAtom(),
OBMol::operator+=(), OBMol::operator=(), OBAtom::SetHybAndGeom(), and OBMol::StripSalts().

int GetMod ( ) [inline]

Returns:
The number of nested BeginModify() calls. Used internally.

void IncrementMod ( ) [inline]


Increase the number of nested BeginModify calls. Dangerous! Instead, properly use BeginModify as needed.

Referenced by OBMol::AddHydrogens(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(),


OBMol::DeleteNonPolarHydrogens(), and OBAtom::SetHybAndGeom().

void DecrementMod ( ) [inline]


Decrease the number of nested BeginModify calls. Dangerous! Instead, properly use EndModify as needed.

Referenced by OBMol::AddHydrogens(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(),


OBMol::DeleteNonPolarHydrogens(), and OBAtom::SetHybAndGeom().

int GetFlags ( ) [inline]

Returns:
the entire set of flags. (Internal use, mainly.)

Referenced by OBAtomTyper::AssignImplicitValence().

const char * GetTitle ( bool replaceNewlines = true ) const

Returns:
the title of this molecule (often the filename)

Parameters:

Member Function Documentation 615


Open Babel: API Documentation

replaceNewlines whether to replace any newline characters with spaces

Referenced by OBMoleculeFormat::DeferMolOutput(), OBMol::DoTransformations(),


OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewPerceiveKekuleBonds(),
OBMol::operator+=(), OBMol::operator=(), OBMoleculeFormat::ReadChemObjectImpl(),
OBMoleculeFormat::ReadNameIndex(), OBMol::start_kekulize(),
OBMoleculeFormat::WriteChemObjectImpl(), and OpenBabel::WriteTitles().

const
unsigned int NumAtoms ( )
[inline]

Returns:
the number of atoms (i.e. OBAtom children)

Referenced by OBMol::AddBond(), OBMol::AddHydrogens(), OBRingSearch::AddRingFromClosure(),


OBChemTsfm::Apply(), patty::assign_types(), OBAromaticTyper::AssignAromaticFlags(),
OBGastChrg::AssignPartialCharges(), OBMol::AssignSpinMultiplicity(), OBRotorList::AssignTorVals(),
OpenBabel::BreakChiralTies(), OpenBabel::CalcSignedVolume(), OpenBabel::CalculateSymmetry(),
OpenBabel::CanonicalLabels(), OpenBabel::CartesianToInternal(), OBMol::Center(),
OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(),
OBBuilder::Connect(), OBMol::ConnectTheDots(), OpenBabel::construct_c_matrix(),
OpenBabel::construct_g_matrix(), OBMol::ContigFragList(), OBMol::CopyConformer(),
OBForceField::CorrectVelocities(), OBRotamerList::CreateConformerList(), OBMol::DeleteHydrogen(),
OpenBabel::DetermineFRJ(), OBForceField::DistanceGeometry(), OBMol::EndModify(),
AliasData::Expand(), OpenBabel::FastSingleMatch(), OBMol::FindLargestFragment(),
OpenBabel::FindRingAtoms(), OBMol::FindRingAtomsAndBonds(), OBRotorList::FindRotors(),
OBMol::FindSSSR(), OpenBabel::FixCisTransBonds(), OBForceField::GenerateVelocities(),
OBMol::GetAtom(), OBForceField::GetAtomTypes(), OpenBabel::GetChirality(),
OBForceField::GetConformers(), OBForceField::GetCoordinates(), OpenBabel::GetDFFVector(),
OBMol::GetExactMass(), OBMol::GetGIDVector(), OBMol::GetGIVector(), OpenBabel::GetGIVector(),
OBForceField::GetGrid(), OBMol::GetGTDVector(), OpenBabel::GetGTDVector(),
OBMol::GetInternalCoord(), OBMol::GetMolWt(), OBAtom::GetNextAtom(), OBMol::GetNextFragment(),
OBForceField::GetPartialCharges(), OBMol::GetSpacedFormula(), OpenBabel::GraphPotentials(),
OBAtom::HtoMethyl(), OBBond::IsClosure(), OBForceField::IsSetupNeeded(), OBForceField::LineSearch(),
OBMoleculeFormat::MakeCombinedMolecule(), OBSSMatch::Match(), OpenBabel::MinimumPairRMS(),
OBMol::NewPerceiveKekuleBonds(), OBMolAtomBFSIter::OBMolAtomBFSIter(),
OBMolAtomDFSIter::OBMolAtomDFSIter(), OBSSMatch::OBSSMatch(), OBMol::operator+=(),
OBMol::operator=(), OBMol::PerceiveKekuleBonds(), OBMoleculeFormat::ReadChemObjectImpl(),
OBRotorList::RemoveSymVals(), OBMol::RenumberAtoms(), OBMol::Rotate(), OBMol::Separate(),
OBRotamerList::SetBaseCoordinateSets(), OBForceField::SetConformers(), OBMol::SetCoordinates(),
OBForceField::SetCoordinates(), OBRotorList::SetRotAtoms(), OBProxGrid::Setup(),
OBForceField::Setup(), OpenBabel::SetupAtomMatchTable(), OBMol::start_kekulize(),
OBForceField::SteepestDescentTakeNSteps(), OBMol::ToInertialFrame(), OBMol::Translate(),
OBForceField::WeightedRotorSearch(), and OBMoleculeFormat::WriteChemObjectImpl().

unsigned int NumBonds ( ) const [inline]

Returns:

Member Function Documentation 616


Open Babel: API Documentation

the number of bonds (i.e. OBBond children)

Referenced by OBMol::AssignSpinMultiplicity(), OBBuilder::Build(), OpenBabel::DetermineFRJ(),


OpenBabel::FixCisTransBonds(), OBMol::GetBond(), OBMol::GetExactMass(), OBMol::GetMolWt(),
OBMol::GetSpacedFormula(), OBForceField::IsSetupNeeded(),
OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator=(), and OBMol::start_kekulize().

unsigned int NumHvyAtoms ( )

Returns:
the number of non-hydrogen atoms

Referenced by OBMol::DoTransformations(), OBMol::GetExactMass(), OBMol::GetMolWt(), and


OBMol::GetSpacedFormula().

unsigned int NumResidues ( ) const [inline]

Returns:
the number of residues (i.e. OBResidue substituents)

Referenced by OBMol::GetResidue(), and OBMol::operator=().

unsigned int NumRotors ( )

Returns:
the number of rotatble bonds. See OBBond::IsRotor() for details

OBAtom * GetAtom ( int idx ) const

Returns:
the atom at index idx or NULL if it does not exist.

Warning:
Atom indexing will change. Use iterator methods instead.

Returns a pointer to the atom after a safety check 0 < idx <= NumAtoms

Referenced by OBMol::AddBond(), OBMol::Align(), OBChemTsfm::Apply(),


OpenBabel::ApplyRotMatToBond(), OBBondTyper::AssignFunctionalGroupBonds(),
OBAtomTyper::AssignHyb(), OBAtomTyper::AssignImplicitValence(),
OBPhModel::AssignSeedPartialCharge(), OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(),
OBBuilder::Build(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(),
OpenBabel::CartesianToInternal(), OBBuilder::Connect(), OBMol::ConnectTheDots(),
OBMol::ContigFragList(), OpenBabel::CorrectBadResonanceForm(), OBBuilder::CorrectStereoAtoms(),
OBBuilder::CorrectStereoBonds(), OBForceField::DistanceGeometry(), AliasData::Expand(),
OpenBabel::FastSingleMatch(), OBRing::findCenterAndNormal(), OBMol::FindChildren(),

Member Function Documentation 617


Open Babel: API Documentation

OBMol::FindLargestFragment(), OpenBabel::FindRings(), OBAtom::GetAngle(), OBMol::GetBond(),


OBForceField::GetCoordinates(), OpenBabel::GetDFFVector(), OBAtom::GetDistance(),
OBForceField::GetGrid(), OBMol::GetGTDVector(), OpenBabel::GetGTDVector(),
OBAtom::GetNextAtom(), OBMol::GetNextFragment(), OBRing::GetRootAtom(),
OBRotorRules::GetRotorIncrements(), OBRing::IsAromatic(), OBForceField::IsSetupNeeded(),
OBSSMatch::Match(), OpenBabel::match(), OBAtom::MatchesSMARTS(),
OpenBabel::MinimumPairRMS(), OBMol::NewPerceiveKekuleBonds(), OBMolAtomBFSIter::operator++(),
OBMolAtomDFSIter::operator++(), OBMol::operator+=(), OBMol::operator=(),
OBMol::PerceiveBondOrders(), OBAromaticTyper::SelectRootAtoms(), OBForceField::SetConformers(),
OBForceField::SetCoordinates(), OBRotorList::SetEvalAtoms(), OBBond::SetLength(),
OBRotamerList::Setup(), OBFFConstraints::Setup(), OBMol::StripSalts(), OBBuilder::Swap(), and
OBForceField::UpdatePairsSimple().

OBAtom * GetFirstAtom ( ) const

Returns:
the first atom in this molecule, or NULL if none exist.

Deprecated:
Will be removed in favor of more standard iterator methods

OBBond * GetBond ( int idx ) const

Returns:
the bond at index idx or NULL if it does not exist.

Warning:
Bond indexing may change. Use iterator methods instead.

Returns a pointer to the bond after a safety check 0 <= idx < NumBonds

Referenced by OBMol::AddBond(), OBChemTsfm::Apply(), OBBuilder::Build(),


OpenBabel::FastSingleMatch(), OpenBabel::FindRings(), OBMol::GetBond(), OBSSMatch::Match(),
OBMol::PerceiveBondOrders(), OBMol::start_kekulize(), and OBBuilder::Swap().

OBBond * GetBond ( int a,


int b
) const

Returns:
the bond connecting the atom indexed by a and b or NULL if none exists.

Warning:
Atom indexing will change. Use atom objects and iterators instead.

Member Function Documentation 618


Open Babel: API Documentation

OBBond * GetBond ( OBAtom * bgn,


OBAtom * end
) const

Returns:
the bond between the atoms bgn and end or NULL if none exists

OBResidue * GetResidue ( int idx ) const

Returns:
the residue indexed by idx, or NULL if none exists

Warning:
Residue indexing may change. Use iterator methods instead.

Referenced by OBMol::operator=().

std::vector< OBInternalCoord * > GetInternalCoord ( )

double GetTorsion ( int a,


int b,
int c,
int d
)

Returns:
the dihedral angle (in degrees) between the four atoms supplied a1-a2-a3-a4) WARNING: SetTorsion
takes an angle in radians while GetTorsion returns it in degrees

Referenced by OBBuilder::CorrectStereoAtoms(), OBRotorRules::GetRotorIncrements(), and


OBMol::PerceiveBondOrders().

double GetTorsion ( OBAtom * a,


OBAtom * b,
OBAtom * c,
OBAtom * d
)

Returns:
the dihedral angle (in degrees) between the four atoms a, b, c, and d) WARNING: SetTorsion takes
an angle in radians while GetTorsion returns it in degrees

Member Function Documentation 619


Open Babel: API Documentation

double GetAngle ( OBAtom * a,


OBAtom * b,
OBAtom * c
)

Returns:
the angle (in degrees) between the three atoms a, b and c (where a-> b (vertex) -> c )

string GetFormula ( )

Returns:
the stochoimetric formula (e.g., C4H6O)

Stochoimetric formula (e.g., C4H6O). This is either set by OBMol::SetFormula() or generated on-the-fly
using the "Hill order" -- i.e., C first if present, then H if present all other elements in alphabetical order.

string GetSpacedFormula ( int ones = 0,


const char * sp = " ",
bool implicitH = true
)

Returns:
the stochoimetric formula in spaced format e.g. C 4 H 6 O 1

Stochoimetric formula in spaced format e.g. C 4 H 6 O 1 No pair data is stored. Normally use without
parameters: GetSpacedFormula()

Since:
version 2.1

Referenced by OBMol::DoTransformations(), OBMol::GetFormula(), and


OBMoleculeFormat::MakeCombinedMolecule().

const
double GetEnergy ( )
[inline]

Returns:
the heat of formation for this molecule (in kcal/mol)

Referenced by OBMol::operator=().

double GetMolWt ( bool implicitH = true )

Returns:

Member Function Documentation 620


Open Babel: API Documentation

the standard molar mass given by IUPAC atomic masses (amu)

double GetExactMass ( bool implicitH = true )

Returns:
the mass given by isotopes (or most abundant isotope, if not specified)

int GetTotalCharge ( )

Returns:
the total charge on this molecule (i.e., 0 = neutral, +1, -1...)

Returns the total molecular charge -- if it has not previously been set it is calculated from the atomic formal
charge information. (This may or may not be correct!) If you set atomic charges with
OBAtom::SetFormalCharge() you really should set the molecular charge with OBMol::SetTotalCharge()

unsigned int GetTotalSpinMultiplicity ( )

Returns:
the total spin on this molecule (i.e., 1 = singlet, 2 = doublet...)

Returns the total spin multiplicity -- if it has not previously been set It is calculated from the atomic spin
multiplicity information assuming the high-spin case (i.e. it simply sums the number of unpaired electrons
assuming no further pairing of spins.

unsigned short int GetDimension ( ) const [inline]

Returns:
the dimensionality of coordinates (i.e., 0 = unknown or no coord, 2=2D, 3=3D)

Referenced by OBPhModel::CorrectForPH(), OBMol::GetNextFragment(),


OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator+=(), and OBMol::operator=().

double* GetCoordinates ( ) [inline]

Returns:
the set of all atomic coordinates. See OBAtom::GetCoordPtr for more

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBScoreGrid::Eval(),
OBForceField::LineSearchTakeStep(), OBForceField::Newton2NumLineSearch(),
OBForceField::RandomRotorSearchInitialize(), OBRotorList::RemoveSymVals(),
OBRotamerList::SetCurrentCoordinates(), OBProxGrid::Setup(),
OBForceField::SteepestDescentTakeNSteps(), and OBForceField::WeightedRotorSearch().

Member Function Documentation 621


Open Babel: API Documentation

vector< OBRing * > & GetSSSR ( )


Implements blue-obelisk:findSmallestSetOfSmallestRings.

Returns:
the Smallest Set of Smallest Rings has been run (see OBRing class

Referenced by OBRingTyper::AssignTypes(), OpenBabel::FindRingAtoms(), OBAtom::IsInRingSize(),


OBForceField::IsInSameRing(), OBAtom::MemberOfRingCount(), OBAtom::MemberOfRingSize(),
OBMol::PerceiveBondOrders(), and OBAromaticTyper::SelectRootAtoms().

bool AutomaticFormalCharge ( ) [inline]


Get the current flag for whether formal charges are set with pH correction.

Referenced by OBPhModel::CorrectForPH().

bool AutomaticPartialCharge ( ) [inline]


Get the current flag for whether partial charges are auto-determined.

Referenced by OBPhModel::AssignSeedPartialCharge().

const
void SetTitle ( char title )
*
Set the title of this molecule to title.

Referenced by OBMol::DoTransformations(), and OBMoleculeFormat::MakeCombinedMolecule().

std::string
void SetTitle ( title )
&
Set the title of this molecule to title.

void SetFormula ( std::string molFormula )


Set the stochiometric formula for this molecule.

void SetEnergy ( double energy ) [inline]


Set the heat of formation for this molecule (in kcal/mol).

void SetDimension ( unsigned short int d ) [inline]


Set the dimension of this molecule (i.e., 0, 1 , 2, 3).

Referenced by OBBuilder::Build(), and OBMol::GetNextFragment().

Member Function Documentation 622


Open Babel: API Documentation

void SetTotalCharge ( int charge )


Set the total charge of this molecule to charge.

void SetTotalSpinMultiplicity ( unsigned int spinMultiplicity )


Set the total spin multiplicity of this molecule to spinMultiplicity Overrides the calculation from spin
multiplicity of OBAtoms

void SetInternalCoord ( std::vector< OBInternalCoord * > int_coord ) [inline]


Set the internal coordinates to int_coord (Does not call InternalToCartesian to update the 3D cartesian
coordinates)

void SetAutomaticFormalCharge ( bool val ) [inline]


Set the flag for determining automatic formal charges with pH (default=true).

void SetAutomaticPartialCharge ( bool val ) [inline]


Set the flag for determining partial charges automatically (default=true).

void SetAromaticPerceived ( ) [inline]


Mark that aromaticity has been perceived for this molecule (see OBAromaticTyper).

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBAtomTyper::AssignImplicitValence(), and


OBMol::EndModify().

void SetSSSRPerceived ( ) [inline]


Mark that Smallest Set of Smallest Rings has been run (see OBRing class).

Referenced by OBMol::FindSSSR().

void SetRingAtomsAndBondsPerceived ( ) [inline]


Mark that rings have been perceived (see OBRing class for details).

void SetAtomTypesPerceived ( ) [inline]


Mark that atom types have been perceived (see OBAtomTyper for details).

Referenced by OBAtomTyper::AssignTypes().

void SetRingTypesPerceived ( ) [inline]


Mark that ring types have been perceived (see OBRingTyper for details).

Referenced by OBRingTyper::AssignTypes().

Member Function Documentation 623


Open Babel: API Documentation

void SetChainsPerceived ( ) [inline]


Mark that chains and residues have been perceived (see OBChainsParser).

void SetChiralityPerceived ( ) [inline]


Mark that chirality has been perceived.

Referenced by OBMol::FindChiralCenters().

void SetPartialChargesPerceived ( ) [inline]


Mark that partial charges have been assigned.

Referenced by OBPhModel::AssignSeedPartialCharge().

void SetHybridizationPerceived ( ) [inline]


Mark that hybridization of all atoms has been assigned.

Referenced by OBAtomTyper::AssignHyb(), OBBuilder::Build(), and OBMol::PerceiveBondOrders().

void SetImplicitValencePerceived ( ) [inline]


Mark that the implicit hydrogen valence of all atoms has been assigned.

Referenced by OBAtomTyper::AssignImplicitValence().

void SetKekulePerceived ( ) [inline]


Mark that Kekule forms have been assigned by Kekulize().

Referenced by OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

void SetClosureBondsPerceived ( ) [inline]


Mark that ring closure bonds have been assigned by graph traversal.

Referenced by OBBond::IsClosure().

void SetHydrogensAdded ( ) [inline]


Mark that explicit hydrogen atoms have been added.

Referenced by OBMol::AddHydrogens().

void SetCorrectedForPH ( ) [inline]

Referenced by OBPhModel::CorrectForPH().

Member Function Documentation 624


Open Babel: API Documentation

void SetAromaticCorrected ( ) [inline]

Referenced by OBAtomTyper::CorrectAromaticNitrogens().

void SetSpinMultiplicityAssigned ( ) [inline]

Referenced by OBMol::AssignSpinMultiplicity().

void SetFlags ( int flags ) [inline]

Referenced by OBAtomTyper::AssignImplicitValence().

void UnsetAromaticPerceived ( ) [inline]

Referenced by OBMol::EndModify().

void UnsetSSSRPerceived ( ) [inline]

Referenced by OBMol::DeleteAtom(), OBMol::DeleteBond(), OBMol::DeleteHydrogen(),


OBMol::DeleteHydrogens(), OBMol::DeleteNonPolarHydrogens(), OBMol::DeleteResidue(), and
OBForceField::Setup().

void UnsetRingTypesPerceived ( ) [inline]

void UnsetPartialChargesPerceived ( ) [inline]

void UnsetImplicitValencePerceived ( ) [inline]

Referenced by OBChemTsfm::Apply(), and OBMol::EndModify().

void UnsetHydrogensAdded ( ) [inline]

Referenced by OBMol::DeleteHydrogen(), and OBMol::DeleteHydrogens().

void UnsetFlag ( int flag ) [inline]

OBBase * DoTransformations ( const std::map< std::string, std::string > * ) [virtual]


Perform a set of transformations specified by the user

Member Function Documentation 625


Open Babel: API Documentation

Typically these are program options to filter or modify an object For example, see
OBMol::DoTransformations() and OBMol::ClassDescription()

Reimplemented from OBBase.

Referenced by OBMoleculeFormat::ReadChemObjectImpl().

const char * ClassDescription ( ) [static]

Returns:
A list of descriptions of command-line options for DoTransformations()

Reimplemented from OBBase.

bool Clear ( void ) [virtual]


Clear all information from a molecule.

Reimplemented from OBBase.

Referenced by OBMol::operator=(), OBMoleculeFormat::ReadNameIndex(), and OBMol::Separate().

void RenumberAtoms ( std::vector< OBAtom * > & v )


Renumber the atoms of this molecule according to the order in the supplied vector.

Renumber the atoms in this molecule according to the order in the supplied vector. This will return without
action if the supplied vector is empty or does not have the same number of atoms as the molecule.

void SetCoordinates ( double * c )


Set the coordinates for all atoms in this conformer.

See also:
OBMol::GetCoordinates()

Referenced by OBForceField::WeightedRotorSearch().

void ToInertialFrame ( int conf,


double * rmat
)
Translate one conformer and rotate by a rotation matrix (which is returned) to the inertial frame-of-reference.

void ToInertialFrame ( )
Translate all conformers to the inertial frame-of-reference.

Member Function Documentation 626


Open Babel: API Documentation

const
void Translate ( vector3 v )
&
Translates all conformers in the molecule by the supplied vector.

this method adds the vector v to all atom positions in all conformers

void Translate ( const vector3 & v,


int nconf
)
Translates one conformer in the molecule by the supplied vector.

this method adds the vector v to all atom positions in the conformer nconf. If nconf ==
OB_CURRENT_CONFORMER, then the atom positions in the current conformer are translated.

const
void Rotate ( u[3][3] )
double
Rotate all conformers using the supplied matrix u (a 3x3 array of double).

Referenced by OBMol::Rotate().

void Rotate ( const double m[9] )


Rotate all conformers using the supplied matrix m (a linear 3x3 row-major array of double).

void Rotate ( const double m[9],


int nconf
)
Rotate a specific conformer nconf using the supplied rotation matrix m.

void Center ( )
Translate to the center of all coordinates (for this conformer).

Referenced by OBMol::DoTransformations().

bool Kekulize ( )
Transform to standard Kekule bond structure (presumably from an aromatic form).

Referenced by OBMol::EndModify(), and OBMol::PerceiveBondOrders().

bool PerceiveKekuleBonds ( )

Member Function Documentation 627


Open Babel: API Documentation

void NewPerceiveKekuleBonds ( )
Kekulize aromatic rings without using implicit valence.

This new perceive kekule bonds function has been designed to handle molecule files without explicit
hydrogens such as pdb or xyz. (It can, of course, easily handle explicit hydrogens too.) The function does not
rely on GetImplicitValence function The function looks for groups of aromatic cycle For each group it tries to
guess the number of electrons given by each atom in order to satisfy the huckel (4n+2) rule If the huckel rule
cannot be satisfied the algorithm try with its best alternative guess Then it recursively walk on the atoms of
the cycle and assign single and double bonds

bool DeleteHydrogens ( )
Delete all hydrogens from the molecule

Returns:
Success

Referenced by OBPhModel::CorrectForPH(), and OBMol::DoTransformations().

bool DeleteHydrogens ( OBAtom * atom )


Delete all hydrogens from the supplied atom

Returns:
Success

bool DeleteNonPolarHydrogens ( )
Delete all hydrogen atoms connected to a non-polar atom

See also:
OBAtom::IsNonPolarHydrogen

bool DeleteHydrogen ( OBAtom * atom )


Delete the supplied atom if it is a hydrogen (Helper function for DeleteHydrogens)

Referenced by OBMol::DeleteAtom(), and OBMol::DeleteHydrogens().

bool AddHydrogens ( bool polaronly = false,


bool correctForPH = false,
double pH = 7.4
)
Add hydrogens to the entire molecule to fill out implicit valence spots

Parameters:
polaronly Whether to add hydrogens only to polar atoms (i.e., not to C atoms)
correctForPH Whether to call CorrectForPH() first

Member Function Documentation 628


Open Babel: API Documentation

pH The pH to use for CorrectForPH() modification

Returns:
Whether any hydrogens were added

Referenced by OBMol::AddPolarHydrogens(), OBMol::DoTransformations(), and


OBSmartsPattern::Match().

bool AddHydrogens ( OBAtom * atom )


Add hydrogens only to the supplied atom to fill out implicit valence.

bool AddPolarHydrogens ( )
Add only polar hydrogens (i.e., attached to polar atoms, not C).

bool StripSalts ( int threshold )


Deletes all atoms except for the largest contiguous fragment.

vector< OBMol > Separate ( int StartIndex = 1 )


Copies each disconnected fragment as a separate OBMol.

Referenced by OBMoleculeFormat::ReadChemObjectImpl().

bool GetNextFragment ( OpenBabel::OBMolAtomDFSIter & iter,


OBMol & newMol
)
Iterative component of Separate to copy one fragment at a time.

Referenced by OBMol::Separate().

bool ConvertDativeBonds ( )
Converts the charged form of coordinate bonds, e.g.[N+]([O-])=O to N(=O)=O.

Converts for instance [N+]([O-])=O to N(=O)=O.

Referenced by OBMol::DoTransformations().

bool CorrectForPH ( double pH = 7.4 )


Correct for pH by applying the OBPhModel transformations.

Referenced by OBMol::AddHydrogens().

Member Function Documentation 629


Open Babel: API Documentation

bool AssignSpinMultiplicity ( bool NoImplicitH = false )


set spin multiplicity for H-deficient atoms

If NoImplicitH is true then the molecule has no implicit hydrogens. Individual atoms on which ForceNoH()
has been called also have no implicit hydrogens. If NoImplicitH is false (the default), then if there are any
explicit hydrogens on an atom then they constitute all the hydrogen on that atom. However, a hydrogen atom
with its _isotope!=0 is not considered explicit hydrogen for this purpose. In addition, an atom which has had
ForceImplH()called for it is never considered hydrogen deficient, e.g. unbracketed atoms in SMILES. Any
discrepancy with the expected atom valency is interpreted as the atom being a radical of some sort and iits
_spinMultiplicity is set to 2 when it is one hydrogen short and 3 when it is two hydrogens short and similarly
for greater hydrogen deficiency.

So SMILES C[CH] is interpreted as methyl carbene, CC[H][H] as ethane, and CC[2H] as CH3CH2D.

Referenced by OBMol::PerceiveBondOrders().

vector3 Center ( int nconf )

Returns:
the center of the supplied conformer nconf

See also:
Center() to actually center all conformers at the origin

void SetTorsion ( OBAtom * a,


OBAtom * b,
OBAtom * c,
OBAtom * d,
double ang
)
Set the torsion defined by these atoms, rotating bonded neighbors

ang The torsion angle in radians


WARNING: SetTorsion takes an angle in radians while GetTorsion returns it in degrees

Referenced by OBBuilder::CorrectStereoBonds().

void FindSSSR ( )
Find Smallest Set of Smallest Rings (see OBRing class for more details).

Referenced by OBMol::GetSSSR(), OBAtom::IsInRingSize(), OBAtom::MemberOfRingCount(),


OBAtom::MemberOfRingSize(), OBMolRingIter::OBMolRingIter(), and OBMol::PerceiveBondOrders().

void FindRingAtomsAndBonds ( )
Find all ring atoms and bonds. Does not need to call FindSSSR().

Member Function Documentation 630


Open Babel: API Documentation

Referenced by OBRotorList::FindRotors(), OBMol::FindSSSR(), OBBond::IsInRing(), and


OBAtom::IsInRing().

void FindChiralCenters ( )
Find all chiral atom centers. See OBAtom::IsChiral() for more details.

Sets atom->IsChiral() to true for chiral atoms.

void FindChildren ( std::vector< int > & children,


int first,
int second
)
locates all atoms for which there exists a path to 'second' without going through 'first' children must not
include 'second'

Referenced by OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBRotorList::AssignTorVals(),


OBBond::SetLength(), OBRotorList::SetRotAtoms(), OBRotorList::SetRotAtomsByFix(),
OBMol::SetTorsion(), and OBRotamerList::Setup().

void FindChildren ( std::vector< OBAtom * > & children,


OBAtom * bgn,
OBAtom * end
)
locates all atoms for which there exists a path to 'end' without going through 'bgn' children must not include
'end'

OBBitVec
void FindLargestFragment ( frag )
&
Find the largest fragment in OBMol (which may include multiple non-connected fragments)

Parameters:
frag Return (by reference) a bit vector indicating the atoms in the largest fragment

void ContigFragList ( std::vector< std::vector< int > > & cfl )


Sort a list of contig fragments by size from largest to smallest Each vector<int> contains the atom numbers of
a contig fragment

Referenced by OpenBabel::DetermineFRJ(), and OBMol::StripSalts().

void Align ( OBAtom * a1,


OBAtom * a2,
vector3 & p1,

Member Function Documentation 631


Open Babel: API Documentation

vector3 & p2
)
Aligns atom a on p1 and atom b along p1->p2 vector.

void ConnectTheDots ( void )


Adds single bonds based on atom proximity.

This method adds single bonds between all atoms closer than their combined atomic covalent radii, then
"cleans up" making sure bonded atoms are not closer than 0.4A and the atom does not exceed its valence. It
implements blue-obelisk:rebondFrom3DCoordinates.

void PerceiveBondOrders ( )
Attempts to perceive multiple bonds based on geometries.

This method uses bond angles and geometries from current connectivity to guess atom types and then filling
empty valences with multiple bonds. It currently has a pass to detect some frequent functional groups. It still
needs a pass to detect aromatic rings to "clean up." AssignSpinMultiplicity(true) is called at the end of the
function. The true states that there are no implict hydrogens in the molecule.

void FindAngles ( )
Fills out an OBAngleData with angles from the molecule.

Referenced by OBMolAngleIter::OBMolAngleIter().

void FindTorsions ( )
Fills out an OBTorsionData with angles from the molecule.

Referenced by OBMolTorsionIter::OBMolTorsionIter().

bool GetGTDVector ( std::vector< int > & gtd )


Calculates the graph theoretical distance of each atom. Vector is indexed from zero.

Referenced by OBRotorList::FindRotors(), and OBMol::GetGIVector().

void GetGIVector ( std::vector< unsigned int > & vid )


Calculates a set of graph invariant indexes using the graph theoretical distance, number of connected heavy
atoms, aromatic boolean, ring boolean, atomic number, and summation of bond orders connected to the atom.
Vector is indexed from zero.

Referenced by OBMol::GetGIDVector().

void GetGIDVector ( std::vector< unsigned int > & vgid )

Member Function Documentation 632


Open Babel: API Documentation

Calculates a set of symmetry identifiers for a molecule. Atoms with the same symmetry ID are symmetrically
equivalent. Vector is indexed from zero.

Referenced by OBMol::FindChiralCenters().

bool Has2D ( )
Are there non-zero coordinates in two dimensions (i.e. X and Y)?

bool Has3D ( )
Are there non-zero coordinates in all three dimensions (i.e. X, Y, Z)?

Referenced by OpenBabel::CalcSignedVolume(), and OpenBabel::match().

bool HasNonZeroCoords ( )
Are there any non-zero coordinates?

Referenced by OBMol::AddHydrogens().

bool HasAromaticPerceived ( ) [inline]


Has aromatic perception been performed?

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBBond::IsAromatic(), and


OBAtom::IsAromatic().

bool HasSSSRPerceived ( ) [inline]


Has the smallest set of smallest rings (FindSSSR) been performed?

Referenced by OBMol::FindSSSR(), OBMol::GetSSSR(), OBAtom::IsInRingSize(),


OBAtom::MemberOfRingCount(), OBAtom::MemberOfRingSize(), OBMolRingIter::OBMolRingIter(), and
OBMol::PerceiveBondOrders().

bool HasRingAtomsAndBondsPerceived ( ) [inline]


Have ring atoms and bonds been assigned?

Referenced by OBBond::IsInRing(), and OBAtom::IsInRing().

bool HasAtomTypesPerceived ( ) [inline]


Have atom types been assigned by OBAtomTyper?

Referenced by OBAtom::GetType().

Member Function Documentation 633


Open Babel: API Documentation

bool HasRingTypesPerceived ( ) [inline]


Have ring types been assigned by OBRingTyper?

Referenced by OBRing::GetType().

bool HasChiralityPerceived ( ) [inline]


Has atom chirality been assigned?

Referenced by OBMol::FindChiralCenters().

bool HasPartialChargesPerceived ( ) [inline]


Have atomic Gasteiger partial charges been assigned by OBGastChrg?

bool HasHybridizationPerceived ( ) [inline]


Has atomic hybridization been assigned by OBAtomTyper?

Referenced by OBAtom::GetHyb().

bool HasImplicitValencePerceived ( ) [inline]


Has implicit hydrogen valence been assigned by OBAtomTyper?

Referenced by OBAtomTyper::AssignImplicitValence(), OBAtom::GetImplicitValence(), and


OBAtom::ImplicitHydrogenCount().

bool HasKekulePerceived ( ) [inline]


Has aromaticity and Kekule forms been assigned by Kekulize?

Referenced by OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

bool HasClosureBondsPerceived ( ) [inline]


Have ring "closure" bonds been assigned? (e.g., OBBond::IsClosure()).

Referenced by OBBond::IsClosure().

bool HasChainsPerceived ( ) [inline]


Have biomolecule chains and residues been assigned by OBChainsParser?

bool HasHydrogensAdded ( ) [inline]


Have hydrogens been added to the molecule?

Referenced by OBMol::AddHydrogens().

Member Function Documentation 634


Open Babel: API Documentation

bool HasAromaticCorrected ( ) [inline]


Have aromatic nitrogens been "corrected?" (deprecated).

Referenced by OBAtomTyper::AssignImplicitValence(), and OBAtomTyper::CorrectAromaticNitrogens().

bool IsCorrectedForPH ( ) [inline]


Has the molecule been corrected for pH by CorrectForPH?

Referenced by OBMol::AddHydrogens(), OBPhModel::CorrectForPH(), and OBMol::CorrectForPH().

bool HasSpinMultiplicityAssigned ( ) [inline]


Has total spin multiplicity been assigned?

Referenced by OBMol::AssignSpinMultiplicity().

bool IsChiral ( )
Is this molecule chiral?

bool Empty ( ) [inline]


Are there any atoms in this molecule?

Referenced by OBMol::BeginModify(), OBMol::ConnectTheDots(), OBMol::EndModify(),


OBSSMatch::OBSSMatch(), OBMol::PerceiveBondOrders(), and OBMol::RenumberAtoms().

int NumConformers ( ) [inline]

Returns:
the number of conformers in this molecule

Referenced by OBMol::AddHydrogens(), OBForceField::GetConformers(), OBMol::operator=(),


OBForceField::RandomRotorSearchInitialize(), OBForceField::RandomRotorSearchNextConformer(),
OBMol::RenumberAtoms(), OBMol::Rotate(), OBForceField::SetConformers(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
OBMol::ToInertialFrame(), OBMol::Translate(), and OBForceField::WeightedRotorSearch().

void SetConformers ( std::vector< double * > & v )


Set the entire set of conformers for this molecule to v.

Referenced by OBForceField::GetConformers(), OBMol::operator=(), and OBForceField::SetConformers().

void AddConformer ( double * f ) [inline]


Add a new set of coordinates f as a new conformer.

Member Function Documentation 635


Open Babel: API Documentation

Referenced by OBForceField::WeightedRotorSearch().

void SetConformer ( int i )


Set the molecule's current conformer to i Does nothing if i is less than 0 or i is larger than NumConformers()

Referenced by OBMol::AddHydrogens(), OBMol::Center(), OBForceField::GetConformers(),


OBForceField::RandomRotorSearchNextConformer(), OBForceField::SetConformers(),
OBForceField::SystematicRotorSearchNextConformer(), OBMol::ToInertialFrame(), and
OBForceField::WeightedRotorSearch().

void CopyConformer ( double * c,


int nconf
)
Copy the conformer nconf into the array c

Warning:
Does no checking to see if c is large enough

void DeleteConformer ( int nconf )


Delete the conformer nconf.

double* GetConformer ( int i ) [inline]

Returns:
the coordinates to conformer i

Referenced by OBForceField::GetConformers(), OBMol::operator=(), OBMol::RenumberAtoms(),


OBMol::Rotate(), OBForceField::SetConformers(), OBMol::ToInertialFrame(), and OBMol::Translate().

void SetEnergies ( std::vector< double > & energies )


Set the entire set of conformer energies.

vector< double > GetEnergies ( )


Set the entire set of conformer energies.

double GetEnergy ( int ci )


Get the energy for conformer ci

ci conformer index

double* BeginConformer ( i ) [inline]

Member Function Documentation 636


Open Babel: API Documentation

std::vector<
double *
>::iterator &
Set the iterator to the beginning of the conformer list

Returns:
the array of coordinates for the first conformer

double* NextConformer ( std::vector< double * >::iterator & i ) [inline]


Advance the iterator to the next confomer, if possible

Returns:
The array of coordinates for the next conformer, or NULL if none exist

std::vector<double*>& GetConformers ( ) [inline]

Returns:
the entire set of conformers for this molecule as a vector of floating point arrays

Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotamerList::SetBaseCoordinateSets(),


and OBForceField::SystematicRotorSearchInitialize().

OBAtomIterator BeginAtoms ( ) [inline]

Returns:
An atom iterator pointing to the beginning of the atom list

OBAtomIterator EndAtoms ( ) [inline]

Returns:
An atom iterator pointing to the end of the atom list

OBBondIterator BeginBonds ( ) [inline]

Returns:
A bond iterator pointing to the beginning of the bond list

OBBondIterator EndBonds ( ) [inline]

Returns:
A bond iterator pointing to the end of the bond list

Member Function Documentation 637


Open Babel: API Documentation

OBResidueIterator BeginResidues ( ) [inline]

Returns:
A residue iterator pointing to the beginning of the residue list

OBResidueIterator EndResidues ( ) [inline]

Returns:
A residue iterator pointing to the end of the residue list

OBAtom * BeginAtom ( OBAtomIterator & i )


Set the iterator i to the beginning of the atom list

Returns:
the first atom (or NULL if none exist)

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(),


OBResidueData::AssignBonds(), OBAtomTyper::AssignHyb(), OBAtomTyper::AssignImplicitValence(),
OBGastChrg::AssignPartialCharges(), OBMol::AssignSpinMultiplicity(), OBAtomTyper::AssignTypes(),
OBMol::BeginModify(), OpenBabel::BreakChiralTies(), OpenBabel::CalcSignedVolume(),
OpenBabel::CalculateSymmetry(), OpenBabel::CanonicalLabels(), OpenBabel::CartesianToInternal(),
OBMol::Center(), OBMol::ConnectTheDots(), OpenBabel::construct_c_matrix(),
OpenBabel::construct_g_matrix(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(),
OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(),
OBMol::DeleteNonPolarHydrogens(), OBMol::EndModify(), OBAromaticTyper::ExcludeSmallRing(),
OpenBabel::FastSingleMatch(), OBMol::FindChiralCenters(), OBMol::FindLargestFragment(),
OpenBabel::GetChirality(), OpenBabel::GetDFFVector(), OBMol::GetExactMass(),
OBMol::GetGIDVector(), OBMol::GetGIVector(), OpenBabel::GetGIVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OBMol::GetMolWt(), OBAtom::GetPartialCharge(),
OBMol::GetTotalCharge(), OBMol::GetTotalSpinMultiplicity(), OBMol::Has2D(), OBMol::Has3D(),
OBMol::HasNonZeroCoords(), OBGrid::Init(), OpenBabel::InternalToCartesian(), OBMol::IsChiral(),
OBBond::IsClosure(), OBSSMatch::Match(), OBMol::NumHvyAtoms(),
OBMolAtomIter::OBMolAtomIter(), OBMolPairIter::OBMolPairIter(), OBMolPairIter::operator++(),
OBMol::operator+=(), OBMol::operator=(), OBMol::PerceiveBondOrders(),
OBMol::PerceiveKekuleBonds(), OBMol::RenumberAtoms(), OBMol::SetCoordinates(),
OBProxGrid::Setup(), OpenBabel::SetupAtomMatchTable(), OBMol::ToInertialFrame(), and
OBMol::~OBMol().

OBAtom * NextAtom ( OBAtomIterator & i )


Advance the iterator i to the next atom in the molecule

Returns:
the next atom (if any, or NULL if none exist)

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(),


OBResidueData::AssignBonds(), OBAtomTyper::AssignHyb(), OBAtomTyper::AssignImplicitValence(),
OBGastChrg::AssignPartialCharges(), OBMol::AssignSpinMultiplicity(), OBAtomTyper::AssignTypes(),

Member Function Documentation 638


Open Babel: API Documentation

OBMol::BeginModify(), OpenBabel::BreakChiralTies(), OpenBabel::CalcSignedVolume(),


OpenBabel::CalculateSymmetry(), OpenBabel::CanonicalLabels(), OpenBabel::CartesianToInternal(),
OBMol::Center(), OBMol::ConnectTheDots(), OpenBabel::construct_c_matrix(),
OpenBabel::construct_g_matrix(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(),
OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(),
OBMol::DeleteNonPolarHydrogens(), OBMol::EndModify(), OBAromaticTyper::ExcludeSmallRing(),
OpenBabel::FastSingleMatch(), OBMol::FindChiralCenters(), OBMol::FindLargestFragment(),
OpenBabel::GetChirality(), OpenBabel::GetDFFVector(), OBMol::GetExactMass(),
OBMol::GetGIDVector(), OBMol::GetGIVector(), OpenBabel::GetGIVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OBMol::GetMolWt(), OBAtom::GetPartialCharge(),
OBMol::GetTotalCharge(), OBMol::GetTotalSpinMultiplicity(), OBMol::Has2D(), OBMol::Has3D(),
OBMol::HasNonZeroCoords(), OBGrid::Init(), OpenBabel::InternalToCartesian(), OBMol::IsChiral(),
OBBond::IsClosure(), OBSSMatch::Match(), OBMol::NumHvyAtoms(), OBMolPairIter::OBMolPairIter(),
OBMolPairIter::operator++(), OBMolAtomIter::operator++(), OBMol::operator+=(), OBMol::operator=(),
OBMol::PerceiveBondOrders(), OBMol::PerceiveKekuleBonds(), OBMol::RenumberAtoms(),
OBMol::SetCoordinates(), OBProxGrid::Setup(), OpenBabel::SetupAtomMatchTable(),
OBMol::ToInertialFrame(), and OBMol::~OBMol().

OBBond * BeginBond ( OBBondIterator & i )


Set the iterator i to the beginning of the bond list

Returns:
the first bond (or NULL if none exist)

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBGastChrg::AssignPartialCharges(),


OBMol::DeleteBond(), OpenBabel::DetermineFRJ(), OBMol::FindChiralCenters(),
OBRotorList::FindRotors(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBBond::IsClosure(),
OBMol::Kekulize(), OBMol::NumRotors(), OBMolBondIter::OBMolBondIter(), OBMol::operator+=(),
OBMol::operator=(), OBMol::PerceiveKekuleBonds(), OBAromaticTyper::SelectRootAtoms(), and
OBMol::~OBMol().

OBBond * NextBond ( OBBondIterator & i )


Advance the iterator i to the next bond in the molecule

Returns:
the next bond (if any, or NULL if none exist)

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBGastChrg::AssignPartialCharges(),


OBMol::DeleteBond(), OpenBabel::DetermineFRJ(), OBMol::FindChiralCenters(),
OBRotorList::FindRotors(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBBond::IsClosure(),
OBMol::Kekulize(), OBMol::NumRotors(), OBMolBondIter::operator++(), OBMol::operator+=(),
OBMol::operator=(), OBMol::PerceiveKekuleBonds(), OBAromaticTyper::SelectRootAtoms(), and
OBMol::~OBMol().

OBResidueIterator
OBResidue* BeginResidue ( i ) [inline]
&
Set the iterator i to the beginning of the resdiue list

Member Function Documentation 639


Open Babel: API Documentation

Returns:
the first residue (or NULL if none exist)

Referenced by OBResidueIter::OBResidueIter(), OBMol::operator+=(), and OBMol::~OBMol().

OBResidue* NextResidue ( OBResidueIterator & i ) [inline]


Advance the iterator i to the next residue in the molecule

Returns:
the next residue (if any, or NULL if not possible)

Referenced by OBResidueIter::operator++(), OBMol::operator+=(), and OBMol::~OBMol().

OBInternalCoord* BeginInternalCoord ( std::vector< OBInternalCoord * >::iterator & i ) [inline]


Set the iterator to the beginning of the internal coordinate list

Returns:
the first internal coordinate record, or NULL if none exist

See also:
SetInternalCoord

OBInternalCoord* NextInternalCoord ( std::vector< OBInternalCoord * >::iterator & i ) [inline]


Advance the iterator to the next internal coordinate record

Returns:
the next first internal coordinate record, or NULL if none exist

See also:
SetInternalCoord

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().

Member Function Documentation 640


Open Babel: API Documentation

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.

[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

Member Function Documentation 641


Open Babel: API Documentation

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]

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().

Member Function Documentation 642


Open Babel: API Documentation

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 Data Documentation

int _flags [protected]


bitfield of flags

Referenced by OBMol::AddHydrogens(), OBMol::Clear(), OBMol::EndModify(), OBMol::OBMol(),


OBMol::PerceiveBondOrders(), and OBMol::StripSalts().

bool _autoPartialCharge [protected]


Assign partial charges automatically.

Referenced by OBMol::OBMol().

Member Data Documentation 643


Open Babel: API Documentation

bool _autoFormalCharge [protected]


Assign formal charges automatically.

Referenced by OBMol::OBMol().

std::string _title [protected]


Molecule title.

Referenced by OBMol::GetTitle(), OBMol::OBMol(), OBMol::operator+=(), OBMol::operator=(), and


OBMol::SetTitle().

std::vector<OBAtom*> _vatom [protected]


vector of atoms

Referenced by OBMol::AddAtom(), OBMol::BeginAtom(), OBMol::Clear(), OBMol::DeleteAtom(),


OBMol::DeleteHydrogen(), OBMol::GetAtom(), OBMol::GetFirstAtom(), OBMol::GetTorsion(),
OBMol::NewAtom(), OBMol::NextAtom(), OBMol::OBMol(), OBMol::operator=(), and
OBMol::RenumberAtoms().

std::vector<OBBond*> _vbond [protected]


vector of bonds

Referenced by OBMol::AddBond(), OBMol::BeginBond(), OBMol::Clear(), OBMol::DeleteBond(),


OBMol::GetBond(), OBMol::NewBond(), OBMol::NextBond(), OBMol::OBMol(), and OBMol::operator=().

unsigned short int _dimension [protected]


Dimensionality of coordinates.

Referenced by OBMol::ConnectTheDots(), OBMol::OBMol(), OBMol::operator+=(), OBMol::operator=(),


and OBMol::PerceiveBondOrders().

int _totalCharge [protected]


Total charge on the molecule.

Referenced by OBMol::GetTotalCharge(), OBMol::OBMol(), and OBMol::SetTotalCharge().

unsigned int _totalSpin [protected]


Total spin on the molecule (if not specified, assumes lowest possible spin).

Referenced by OBMol::GetTotalSpinMultiplicity(), and OBMol::SetTotalSpinMultiplicity().

double* _c [protected]

Member Data Documentation 644


Open Babel: API Documentation

coordinate array

Referenced by OBMol::AddHydrogens(), OBMol::BeginModify(), OBMol::Clear(),


OBMol::ConnectTheDots(), OBMol::EndModify(), OBMol::Has3D(), OBMol::OBMol(), OBMol::Rotate(),
OBMol::SetConformer(), OBMol::SetConformers(), OBMol::SetCoordinates(), OBMol::SetTorsion(), and
OBMol::Translate().

std::vector<double*> _vconf [protected]


vector of conformers

Referenced by OBMol::AddHydrogens(), OBMol::BeginModify(), OBMol::Center(), OBMol::Clear(),


OBMol::ConnectTheDots(), OBMol::CopyConformer(), OBMol::DeleteConformer(),
OBMol::DeleteHydrogen(), OBMol::EndModify(), OBMol::OBMol(), OBMol::SetConformer(),
OBMol::SetConformers(), OBMol::SetCoordinates(), and OBMol::~OBMol().

double _energy [protected]


heat of formation

Referenced by OBMol::OBMol(), and OBMol::operator=().

unsigned int _natoms [protected]


Number of atoms.

Referenced by OBMol::AddAtom(), OBMol::Clear(), OBMol::ConnectTheDots(), OBMol::DeleteAtom(),


OBMol::DeleteHydrogen(), OBMol::NewAtom(), and OBMol::OBMol().

unsigned int _nbonds [protected]


Number of bonds.

Referenced by OBMol::AddBond(), OBMol::Clear(), OBMol::DeleteBond(), OBMol::NewBond(), and


OBMol::OBMol().

std::vector<OBResidue*> _residue [protected]


Residue information (if applicable).

Referenced by OBMol::AddResidue(), OBMol::Clear(), OBMol::DeleteResidue(), OBMol::GetResidue(),


OBMol::NewResidue(), and OBMol::operator+=().

std::vector<OBInternalCoord*> _internals [protected]


Internal Coordinates (if applicable).

Referenced by OBMol::GetInternalCoord().

Member Data Documentation 645


Open Babel: API Documentation

unsigned short int _mod [protected]


Number of nested calls to BeginModify().

Referenced by OBMol::BeginModify(), OBMol::Clear(), OBMol::EndModify(), and OBMol::OBMol().

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:

• mol.h
• chiral.cpp
• kekulize.cpp
• mol.cpp
• ring.cpp
• transform.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 646


OBMolAngleIter Member List
This is the complete list of members for OBMolAngleIter, including all inherited members.

OBMolAngleIter() OBMolAngleIter [inline]


OBMolAngleIter(OBMol *mol) OBMolAngleIter
OBMolAngleIter(OBMol &mol) OBMolAngleIter
OBMolAngleIter(const OBMolAngleIter &ai) OBMolAngleIter
operator bool() const OBMolAngleIter [inline]
operator*() const OBMolAngleIter [inline]
operator++() OBMolAngleIter
operator=(const OBMolAngleIter &ai) OBMolAngleIter
~OBMolAngleIter() OBMolAngleIter [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::OBMolAngleIter

OBMolAngleIter Member List 647


OBMolAngleIter Class Reference
Iterate over all angles in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolAngleIter ()
OBMolAngleIter (OBMol *mol)
OBMolAngleIter (OBMol &mol)
OBMolAngleIter (const OBMolAngleIter &ai)
~OBMolAngleIter ()
OBMolAngleIter & operator= (const OBMolAngleIter &ai)
operator bool () const
OBMolAngleIter & operator++ ()
std::vector< unsigned int > operator* () const

Detailed Description
Iterate over all angles in an OBMol.

Since:
version 2.1

To facilitate iteration through all angles in a molecule, without resorting to atom indexes (which will change
in the future), a variety of iterator methods are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_ANGLES_OF_MOL(a,m) for( OBMolAngleIter a(m); a; a++ )

Here is an example:

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

OBMol mol;
OBAtom *a, *b, *c;
double ang;

FOR_ANGLES_OF_MOL(angle, mol)
{
// The variable a behaves like OBAngle* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*a

b = _mol.GetAtom((*angle)[0] + 1);

OBMolAngleIter Class Reference 648


Open Babel: API Documentation
a = _mol.GetAtom((*angle)[1] + 1);
c = _mol.GetAtom((*angle)[2] + 1);
ang = a->GetAngle(b->GetIdx(), c->GetIdx());
}

Constructor & Destructor Documentation

OBMolAngleIter ( ) [inline]

OBMolAngleIter ( OBMol * mol )

OBMolAngleIter ( OBMol & mol )

OBMolAngleIter ( const OBMolAngleIter & ai )

~OBMolAngleIter ( ) [inline]

Member Function Documentation

OBMolAngleIter & operator= ( const OBMolAngleIter & ai )

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more angles)

OBMolAngleIter & operator++ ( )


Preincrement -- advance to the next angle and return.

std::vector<unsigned int> operator* ( ) const [inline]

Returns:
A vector of three atom indexes specifying the angle

See also:
OBAtom::GetIdx()

The documentation for this class was generated from the following files:

Detailed Description 649


Open Babel: API Documentation

• 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 650


OBMolAtomBFSIter Member List
This is the complete list of members for OBMolAtomBFSIter, including all inherited members.

CurrentDepth() const OBMolAtomBFSIter


OBMolAtomBFSIter() OBMolAtomBFSIter [inline]
OBMolAtomBFSIter(OBMol *mol, int StartIndex=1) OBMolAtomBFSIter
OBMolAtomBFSIter(OBMol &mol, int StartIndex=1) OBMolAtomBFSIter
OBMolAtomBFSIter(const OBMolAtomBFSIter &ai) OBMolAtomBFSIter
operator bool() const OBMolAtomBFSIter [inline]
operator*() const OBMolAtomBFSIter [inline]
operator++() OBMolAtomBFSIter
operator++(int) OBMolAtomBFSIter
operator->() const OBMolAtomBFSIter [inline]
operator=(const OBMolAtomBFSIter &ai) OBMolAtomBFSIter
~OBMolAtomBFSIter() OBMolAtomBFSIter [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::OBMolAtomBFSIter

OBMolAtomBFSIter Member List 651


OBMolAtomBFSIter Class Reference
Iterate over all atoms in an OBMol in a breadth-first search (BFS). More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolAtomBFSIter ()
OBMolAtomBFSIter (OBMol *mol, int StartIndex=1)
OBMolAtomBFSIter (OBMol &mol, int StartIndex=1)
OBMolAtomBFSIter (const OBMolAtomBFSIter &ai)
~OBMolAtomBFSIter ()
OBMolAtomBFSIter & operator= (const OBMolAtomBFSIter &ai)
operator bool () const
OBMolAtomBFSIter & operator++ ()
OBMolAtomBFSIter operator++ (int)
OBAtom * operator-> () const
OBAtom & operator* () const
int CurrentDepth () const

Detailed Description
Iterate over all atoms in an OBMol in a breadth-first search (BFS).

Since:
version 2.1

To facilitate iteration through all atoms in a molecule, without resorting to atom indexes (which will change in
the future), a variety of iterator methods are provided.

This class provides a breadth-first search ordering of atoms. When one connected component is exhausted, the
iterator will start at another until all atoms are visited. No guarantee is made as to the ordering of iteration
through connected components.

The iterator maintains an internal queue and list of visited atoms. As such it may not be appropriate for
memory-constrained situations when iterating through large molecules.

Use of this iterator has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_BFS_OF_MOL(a,m) for( OBMolAtomBFSIter a(m); a; ++a )

Here is an example:

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

OBMolAtomBFSIter Class Reference 652


Open Babel: API Documentation

OBMol mol;
FOR_BFS_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

Constructor & Destructor Documentation

OBMolAtomBFSIter ( ) [inline]

OBMolAtomBFSIter ( OBMol * mol,


int StartIndex = 1
)

OBMolAtomBFSIter ( OBMol & mol,


int StartIndex = 1
)

OBMolAtomBFSIter ( const OBMolAtomBFSIter & ai )

~OBMolAtomBFSIter ( ) [inline]

Member Function Documentation

OBMolAtomBFSIter & operator= ( const OBMolAtomBFSIter & ai )

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more atoms)

OBMolAtomBFSIter & operator++ ( )


Preincrement -- advance to the next atom in the BFS list and return.

Referenced by OBMolAtomBFSIter::operator++().

Detailed Description 653


Open Babel: API Documentation

OBMolAtomBFSIter operator++ ( int )


Postincrement -- return the current atom and advance to the next atom.

const
OBAtom* operator-> ( )
[inline]

Returns:
a pointer to the current atom

const
OBAtom& operator* ( )
[inline]

Returns:
a reference to the current atom

int CurrentDepth ( ) const

Returns:
the current depth of the iterator

Since:
version 2.2

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

Member Function Documentation 654


Open Babel: API Documentation
• Classes
• Files

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

Member Function Documentation 655


OBMolAtomDFSIter Member List
This is the complete list of members for OBMolAtomDFSIter, including all inherited members.

next() OBMolAtomDFSIter [inline]


OBMolAtomDFSIter() OBMolAtomDFSIter [inline]
OBMolAtomDFSIter(OBMol *mol, int StartIndex=1) OBMolAtomDFSIter
OBMolAtomDFSIter(OBMol &mol, int StartIndex=1) OBMolAtomDFSIter
OBMolAtomDFSIter(const OBMolAtomDFSIter &ai) OBMolAtomDFSIter
operator bool() const OBMolAtomDFSIter [inline]
operator*() const OBMolAtomDFSIter [inline]
operator++() OBMolAtomDFSIter
operator++(int) OBMolAtomDFSIter
operator->() const OBMolAtomDFSIter [inline]
operator=(const OBMolAtomDFSIter &ai) OBMolAtomDFSIter
~OBMolAtomDFSIter() OBMolAtomDFSIter [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::OBMolAtomDFSIter

OBMolAtomDFSIter Member List 656


OBMolAtomDFSIter Class Reference
Iterate over all atoms in an OBMol in a depth-first search (DFS). More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolAtomDFSIter ()
OBMolAtomDFSIter (OBMol *mol, int StartIndex=1)
OBMolAtomDFSIter (OBMol &mol, int StartIndex=1)
OBMolAtomDFSIter (const OBMolAtomDFSIter &ai)
~OBMolAtomDFSIter ()
OBMolAtomDFSIter & operator= (const OBMolAtomDFSIter &ai)
operator bool () const
OBMolAtomDFSIter & operator++ ()
OBMolAtomDFSIter operator++ (int)
OBAtom * operator-> () const
OBAtom & operator* () const
OBAtom * next ()

Detailed Description
Iterate over all atoms in an OBMol in a depth-first search (DFS).

Since:
version 2.1

To facilitate iteration through all atoms in a molecule, without resorting to atom indexes (which will change in
the future), a variety of iterator methods are provided.

This class provides a depth-first search ordering of atoms. When one connected component is exhausted, the
iterator will start at another until all atoms are visited. No guarantee is made as to the ordering of iteration
through connected components.

The iterator maintains an internal stack and list of visited atoms. As such it may not be appropriate for
memory-constrained situations when iterating through large molecules.

Use of this iterator has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_DFS_OF_MOL(a,m) for( OBMolAtomDFSIter a(m); a; ++a )

Here is an example:

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

OBMolAtomDFSIter Class Reference 657


Open Babel: API Documentation

OBMol mol;
FOR_DFS_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

Constructor & Destructor Documentation

OBMolAtomDFSIter ( ) [inline]

OBMolAtomDFSIter ( OBMol * mol,


int StartIndex = 1
)

OBMolAtomDFSIter ( OBMol & mol,


int StartIndex = 1
)

OBMolAtomDFSIter ( const OBMolAtomDFSIter & ai )

~OBMolAtomDFSIter ( ) [inline]

Member Function Documentation

const
OBMolAtomDFSIter & operator= ( OBMolAtomDFSIter ai )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more atoms)

OBMolAtomDFSIter & operator++ ( )


Preincrement -- advance to the next atom in the DFS list and return.

Detailed Description 658


Open Babel: API Documentation

Referenced by OBMolAtomDFSIter::operator++().

OBMolAtomDFSIter operator++ ( int )


Postincrement -- return the current atom and advance to the next atom.

const
OBAtom* operator-> ( )
[inline]

Returns:
a pointer to the current atom

const
OBAtom& operator* ( )
[inline]

Returns:
a reference to the current atom

OBAtom* next ( ) [inline]

Returns:
NULL if at the last atom in a fragment, else the next atom

Referenced by OBMolAtomDFSIter::operator++().

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

Member Function Documentation 659


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

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

Member Function Documentation 660


OBMolAtomIter Member List
This is the complete list of members for OBMolAtomIter, including all inherited members.

OBMolAtomIter() OBMolAtomIter [inline]


OBMolAtomIter(OBMol *mol) OBMolAtomIter
OBMolAtomIter(OBMol &mol) OBMolAtomIter
OBMolAtomIter(const OBMolAtomIter &ai) OBMolAtomIter
operator bool() const OBMolAtomIter [inline]
operator*() const OBMolAtomIter [inline]
operator++() OBMolAtomIter
operator++(int) OBMolAtomIter
operator->() const OBMolAtomIter [inline]
operator=(const OBMolAtomIter &ai) OBMolAtomIter
~OBMolAtomIter() OBMolAtomIter [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::OBMolAtomIter

OBMolAtomIter Member List 661


OBMolAtomIter Class Reference
Iterate over all atoms in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolAtomIter ()
OBMolAtomIter (OBMol *mol)
OBMolAtomIter (OBMol &mol)
OBMolAtomIter (const OBMolAtomIter &ai)
~OBMolAtomIter ()
OBMolAtomIter & operator= (const OBMolAtomIter &ai)
operator bool () const
OBMolAtomIter & operator++ ()
OBMolAtomIter operator++ (int)
OBAtom * operator-> () const
OBAtom & operator* () const

Detailed Description
Iterate over all atoms in an OBMol.

To facilitate iteration through all atoms in a molecule, without resorting to atom indexes (which will change in
the future), a variety of iterator methods are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_ATOMS_OF_MOL(a,m) for( OBMolAtomIter a(m); a; ++a )

Here is an example:

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

OBMol mol;
double exactMass = 0.0;
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

exactMass += a->GetExactMass();
}

OBMolAtomIter Class Reference 662


Open Babel: API Documentation

Constructor & Destructor Documentation

OBMolAtomIter ( ) [inline]

OBMolAtomIter ( OBMol * mol )

OBMolAtomIter ( OBMol & mol )

OBMolAtomIter ( const OBMolAtomIter & ai )

~OBMolAtomIter ( ) [inline]

Member Function Documentation

const
OBMolAtomIter & operator= ( OBMolAtomIter ai )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more atoms)

OBMolAtomIter & operator++ ( )


Preincrement iterator -- advance to next atom and return.

Referenced by OBMolAtomIter::operator++().

OBMolAtomIter operator++ ( int )


Postincrement iterator -- return the current atom and advance.

const
OBAtom* operator-> ( )
[inline]

Returns:
a pointer to the current atom

Constructor & Destructor Documentation 663


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 664


OBMolBondIter Member List
This is the complete list of members for OBMolBondIter, including all inherited members.

OBMolBondIter() OBMolBondIter [inline]


OBMolBondIter(OBMol *mol) OBMolBondIter
OBMolBondIter(OBMol &mol) OBMolBondIter
OBMolBondIter(const OBMolBondIter &bi) OBMolBondIter
operator bool() const OBMolBondIter [inline]
operator*() const OBMolBondIter [inline]
operator++() OBMolBondIter
operator++(int) OBMolBondIter
operator->() const OBMolBondIter [inline]
operator=(const OBMolBondIter &bi) OBMolBondIter
~OBMolBondIter() OBMolBondIter [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::OBMolBondIter

OBMolBondIter Member List 665


OBMolBondIter Class Reference
Iterate over all bonds in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolBondIter ()
OBMolBondIter (OBMol *mol)
OBMolBondIter (OBMol &mol)
OBMolBondIter (const OBMolBondIter &bi)
~OBMolBondIter ()
OBMolBondIter & operator= (const OBMolBondIter &bi)
operator bool () const
OBMolBondIter & operator++ ()
OBMolBondIter operator++ (int)
OBBond * operator-> () const
OBBond & operator* () const

Detailed Description
Iterate over all bonds in an OBMol.

To facilitate iteration through all bonds in a molecule, without resorting to bond indexes (which may change
in the future), a variety of iterators are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_BONDS_OF_MOL(b,m) for( OBMolBondIter b(m); b; ++b )

Here is an example:

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

OBMol mol;
unsigned int bondOrderSum = 0;
FOR_BONDS_OF_MOL(b, mol)
{
// 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
bondOrderSum += b->GetBO();
}

OBMolBondIter Class Reference 666


Open Babel: API Documentation

Constructor & Destructor Documentation

OBMolBondIter ( ) [inline]

OBMolBondIter ( OBMol * mol )

OBMolBondIter ( OBMol & mol )

OBMolBondIter ( const OBMolBondIter & bi )

~OBMolBondIter ( ) [inline]

Member Function Documentation

OBMolBondIter & operator= ( const OBMolBondIter & bi )

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more bonds)

OBMolBondIter & operator++ ( )


Preincrement -- advance to the next bond and return.

Referenced by OBMolBondIter::operator++().

OBMolBondIter operator++ ( int )


Postincrement -- return the current bond and advance to the next.

const
OBBond* operator-> ( )
[inline]

Returns:
a pointer to the current bond

OBBond& operator* ( )

Constructor & Destructor Documentation 667


Open Babel: API Documentation

const
[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 668


OBMolPairIter Member List
This is the complete list of members for OBMolPairIter, including all inherited members.

OBMolPairIter() OBMolPairIter [inline]


OBMolPairIter(OBMol *mol) OBMolPairIter
OBMolPairIter(OBMol &mol) OBMolPairIter
OBMolPairIter(const OBMolPairIter &ai) OBMolPairIter
operator bool() const OBMolPairIter [inline]
operator*() const OBMolPairIter [inline]
operator++() OBMolPairIter
operator=(const OBMolPairIter &ai) OBMolPairIter
~OBMolPairIter() OBMolPairIter [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::OBMolPairIter

OBMolPairIter Member List 669


OBMolPairIter Class Reference
Iterate over all pairs of atoms (>1-4) in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolPairIter ()
OBMolPairIter (OBMol *mol)
OBMolPairIter (OBMol &mol)
OBMolPairIter (const OBMolPairIter &ai)
~OBMolPairIter ()
OBMolPairIter & operator= (const OBMolPairIter &ai)
operator bool () const
OBMolPairIter & operator++ ()
std::vector< unsigned int > operator* () const

Detailed Description
Iterate over all pairs of atoms (>1-4) in an OBMol.

Since:
version 2.1.

To facilitate iteration through all pairs of atoms in a molecule, without resorting to bond indexes (which may
change in the future), a variety of iterators are provided. These pairs of atoms are separated by 4 atoms or
more (i.e., these are non-bonded interactions).

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_PAIRS_OF_MOL(p,m) for( OBMolPairIter p(m); p; p++ )

Here is an example:

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

OBMol mol;
OBAtom *a, *b;
double rab;

FOR_PAIRS_OF_MOL(p, mol)
{
// 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 &*p

OBMolPairIter Class Reference 670


Open Babel: API Documentation

a = mol.GetAtom(p->first);
b = mol.GetAtom(p->second);
rab = a->GetDistance(b);
}

Constructor & Destructor Documentation

OBMolPairIter ( ) [inline]

OBMolPairIter ( OBMol * mol )

OBMolPairIter ( OBMol & mol )

OBMolPairIter ( const OBMolPairIter & ai )

~OBMolPairIter ( ) [inline]

Member Function Documentation

OBMolPairIter & operator= ( const OBMolPairIter & ai )

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more 1-4 atom pairs)

OBMolPairIter & operator++ ( )


Preincrement -- advance to the next 1-4 atom pair and return.

std::vector<unsigned int> operator* ( ) const [inline]

Returns:
A vector of two atom indexes specifying the 1-4 atom pair

See also:
OBAtom::GetIdx()

The documentation for this class was generated from the following files:

Detailed Description 671


Open Babel: API Documentation

• 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 672


OBMolRingIter Member List
This is the complete list of members for OBMolRingIter, including all inherited members.

OBMolRingIter() OBMolRingIter [inline]


OBMolRingIter(OBMol *mol) OBMolRingIter
OBMolRingIter(OBMol &mol) OBMolRingIter
OBMolRingIter(const OBMolRingIter &ri) OBMolRingIter
operator bool() const OBMolRingIter [inline]
operator*() const OBMolRingIter [inline]
operator++() OBMolRingIter
operator++(int) OBMolRingIter
operator->() const OBMolRingIter [inline]
operator=(const OBMolRingIter &ri) OBMolRingIter
~OBMolRingIter() OBMolRingIter [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::OBMolRingIter

OBMolRingIter Member List 673


OBMolRingIter Class Reference
Iterate over all rings in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolRingIter ()
OBMolRingIter (OBMol *mol)
OBMolRingIter (OBMol &mol)
OBMolRingIter (const OBMolRingIter &ri)
~OBMolRingIter ()
OBMolRingIter & operator= (const OBMolRingIter &ri)
operator bool () const
OBMolRingIter & operator++ ()
OBMolRingIter operator++ (int)
OBRing * operator-> () const
OBRing & operator* () const

Detailed Description
Iterate over all rings in an OBMol.

Since:
version 2.1

To facilitate iteration through all rings in a molecule, without resorting to ring indexes (which may change in
the future) a variety of iterator classes and methods are provided. One word of warning is that these iterator
methods automatically call OBMol::FindSSSR() which may involve a significant performance hit on large
molecules.

Calling iterator classes has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_RINGS_OF_MOL(r,m) for( OBMolRingIter r(m); r; ++r )

Here is an example:

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

OBMol mol;
FOR_RINGS_OF_MOL(r, mol)
{
// The variable r behaves like OBRing* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*r

OBMolRingIter Class Reference 674


Open Babel: API Documentation

Constructor & Destructor Documentation

OBMolRingIter ( ) [inline]

OBMolRingIter ( OBMol * mol )

OBMolRingIter ( OBMol & mol )

OBMolRingIter ( const OBMolRingIter & ri )

~OBMolRingIter ( ) [inline]

Member Function Documentation

const
OBMolRingIter & operator= ( OBMolRingIter ri )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can advance (i.e., there are more rings)

OBMolRingIter & operator++ ( )


Preincrement -- advance to the next ring (if any) and return.

Referenced by OBMolRingIter::operator++().

OBMolRingIter operator++ ( int )


Postincrement -- return the current state and advance to the next ring.

const
OBRing* operator-> ( )
[inline]

Returns:

Detailed Description 675


Open Babel: API Documentation

A pointer to the current ring (if any)

const
OBRing& operator* ( )
[inline]

Returns:
A reference to the current ring (if any)

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 676


OBMolTorsionIter Member List
This is the complete list of members for OBMolTorsionIter, including all inherited members.

OBMolTorsionIter() OBMolTorsionIter [inline]


OBMolTorsionIter(OBMol *mol) OBMolTorsionIter
OBMolTorsionIter(OBMol &mol) OBMolTorsionIter
OBMolTorsionIter(const OBMolTorsionIter &ai) OBMolTorsionIter
operator bool() const OBMolTorsionIter [inline]
operator*() const OBMolTorsionIter [inline]
operator++() OBMolTorsionIter
operator=(const OBMolTorsionIter &ai) OBMolTorsionIter
~OBMolTorsionIter() OBMolTorsionIter [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::OBMolTorsionIter

OBMolTorsionIter Member List 677


OBMolTorsionIter Class Reference
Iterate over all torsions in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBMolTorsionIter ()
OBMolTorsionIter (OBMol *mol)
OBMolTorsionIter (OBMol &mol)
OBMolTorsionIter (const OBMolTorsionIter &ai)
~OBMolTorsionIter ()
OBMolTorsionIter & operator= (const OBMolTorsionIter &ai)
operator bool () const
OBMolTorsionIter & operator++ ()
std::vector< unsigned int > operator* () const

Detailed Description
Iterate over all torsions in an OBMol.

Since:
version 2.1

To facilitate iteration through all torsions in a molecule, without resorting to atom indexes (which will change
in the future), a variety of iterator methods are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_TORSIONS_OF_MOL(t,m) for( OBMolTorsionIter t(m); t; t++ )

Here is an example:

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

OBMol mol;
OBAtom *a, *b, *c, *d;
double tor;

FOR_TORSIONS_OF_MOL(t, mol)
{
// The variable a behaves like OBTorsion* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*t

a = _mol.GetAtom((*t)[0] + 1); // indices in vector start from 0!!!

OBMolTorsionIter Class Reference 678


Open Babel: API Documentation
b = _mol.GetAtom((*t)[1] + 1);
c = _mol.GetAtom((*t)[2] + 1);
d = _mol.GetAtom((*t)[3] + 1);
tor = mol.GetTorsion(a->GetIdx(), b->GetIdx(), c->GetIdx(), d->GetIdx());
}

Constructor & Destructor Documentation

OBMolTorsionIter ( ) [inline]

OBMolTorsionIter ( OBMol * mol )

OBMolTorsionIter ( OBMol & mol )

OBMolTorsionIter ( const OBMolTorsionIter & ai )

~OBMolTorsionIter ( ) [inline]

Member Function Documentation

OBMolTorsionIter & operator= ( const OBMolTorsionIter & ai )

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more torsions)

OBMolTorsionIter & operator++ ( )


Preincrement -- advance to the next torsion and return.

std::vector<unsigned int> operator* ( ) const [inline]

Returns:
A vector of four atom indexes specifying the torsion

See also:
OBAtom::GetIdx()

The documentation for this class was generated from the following files:

Detailed Description 679


Open Babel: API Documentation

• 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 680


OBMoleculeFormat Member List
This is the complete list of members for OBMoleculeFormat, including all inherited members.

_id OBPlugin [protected]


[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin
protected, static]
Begin(const char *PluginID) OBPlugin [inline, static]
DeferMolOutput(OBMol *pmol, OBConversion *pConv,
OBMoleculeFormat [static]
OBFormat *pF)
DeleteDeferredMols() OBMoleculeFormat [static]
Description()=0 OBFormat [pure virtual]
Display(std::string &txt, const char *param, const char
OBFormat [virtual]
*ID=NULL)
End(const char *PluginID) OBPlugin [inline, static]
FirstLine(const char *txt) OBPlugin [static]
Flags() OBFormat [inline, virtual]
FormatFromMIME(const char *MIME) OBFormat [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetMIMEType() OBFormat [inline]
GetPlugin(const char *Type, const char *ID) OBPlugin [inline, static]
GetType() OBMoleculeFormat [inline, virtual]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
List(const char *PluginID, const char *param=NULL,
OBPlugin [static]
std::ostream *os=&std::cout)
ListAsString(const char *PluginID, const char
OBPlugin [static]
*param=NULL)
ListAsVector(const char *PluginID, const char *param,
OBPlugin [static]
std::vector< std::string > &vlist)
MakeCombinedMolecule(OBMol *pFirst, OBMol
OBMoleculeFormat [static]
*pSecond)
MakeInstance(const std::vector< std::string > &) OBPlugin [inline, virtual]
MakeNewInstance() OBFormat [inline, virtual]
NameIndexType typedef OBMoleculeFormat
OBFormat() OBFormat [inline]
OBMoleculeFormat() OBMoleculeFormat [inline]
OutputDeferredMols(OBConversion *pConv) OBMoleculeFormat [static]
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin
protected, static]
PluginMapType typedef OBPlugin

OBMoleculeFormat Member List 681


Open Babel: API Documentation

ReadChemObject(OBConversion *pConv) OBMoleculeFormat [inline, virtual]


ReadChemObjectImpl(OBConversion *pConv, OBFormat
OBMoleculeFormat [static]
*)
ReadMolecule(OBBase *, OBConversion *) OBFormat [inline, virtual]
ReadNameIndex(NameIndexType &index, const std::string
OBMoleculeFormat [static]
&datafilename, OBFormat *pInFormat)
RegisterFormat(const char *ID, const char
OBFormat
*MIME=NULL)
SkipObjects(int, OBConversion *) OBFormat [inline, virtual]
SpecificationURL() OBFormat [inline, virtual]
TargetClassDescription() OBFormat [virtual]
TypeID() OBFormat [inline]
WriteChemObject(OBConversion *pConv) OBMoleculeFormat [inline, virtual]
WriteChemObjectImpl(OBConversion *pConv, OBFormat
OBMoleculeFormat [static]
*)
WriteMolecule(OBBase *, OBConversion *) OBFormat [inline, virtual]
~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:57 2008 by 1.5.6.

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

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

OpenBabel::OBMoleculeFormat

OBMoleculeFormat Member List 682


OBMoleculeFormat Class Reference
An OBFormat convenience subclass for conversion to/from OBMol data. More...

#include <openbabel/obmolecformat.h>

Inheritance diagram for OBMoleculeFormat:

[legend]

List of all members.

Public Types
typedef std::map< std::string,
unsigned > NameIndexType
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


OBMoleculeFormat ()
virtual bool ReadChemObject (OBConversion *pConv)
virtual bool WriteChemObject (OBConversion *pConv)
const std::type_info & GetType ()
const char * TypeID ()
virtual bool ReadMolecule (OBBase *, OBConversion *)
virtual bool WriteMolecule (OBBase *, OBConversion *)
virtual const char * Description ()=0
virtual const char * TargetClassDescription ()
virtual const char * SpecificationURL ()
const char * GetMIMEType ()
virtual unsigned int Flags ()
virtual int SkipObjects (int, OBConversion *)
virtual OBFormat * MakeNewInstance ()
int RegisterFormat (const char *ID, const char *MIME=NULL)

OBMoleculeFormat Class Reference 683


Open Babel: API Documentation
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static bool ReadChemObjectImpl (OBConversion *pConv, OBFormat *)
static bool WriteChemObjectImpl (OBConversion *pConv, OBFormat *)
static bool ReadNameIndex (NameIndexType &index, const std::string &datafilename,
OBFormat *pInFormat)
static OBFormat * FormatFromMIME (const char *MIME)
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)
Routines to handle the -C option for combining data from several OBMols
static bool DeferMolOutput (OBMol *pmol, OBConversion *pConv, OBFormat *pF)
static bool OutputDeferredMols (OBConversion *pConv)
static bool DeleteDeferredMols ()
static OBMol * MakeCombinedMolecule (OBMol *pFirst, OBMol *pSecond)

Static Protected Member Functions


static PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
const char * _id

Detailed Description
An OBFormat convenience subclass for conversion to/from OBMol data.

This class is not intended for direct use outside of Open Babel, unless you're writing a new format converting
to or from an OBMol molecule. (e.g., see
http://openbabel.sourceforge.net/wiki/HowTo:Add_A_New_File_Format).

An OBFormat which converts to and/or from OBMol can derive from this class to save duplicating the
ReadChemObject() and/or WriteChemObject() methods. Derive directly from OBFormat if the object
converted is not OBMol or if interaction with the framework is required during the execution of

Public Member Functions 684


Open Babel: API Documentation

ReadMolecule() or WriteMolecule(), as for example in CMLFormat

Member Typedef Documentation

typedef std::map<std::string, unsigned> NameIndexType

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

OBMoleculeFormat ( ) [inline]

Member Function Documentation

bool ReadChemObjectImpl ( OBConversion * pConv,


OBFormat * pFormat
) [static]
Static routine, which can be called from elsewhere.

Referenced by XMLMoleculeFormat::ReadChemObject().

bool WriteChemObjectImpl ( OBConversion * pConv,


OBFormat * pFormat
) [static]
Static routine, which can be called from elsewhere.

Referenced by XMLMoleculeFormat::WriteChemObject().

[inline,
virtual bool ReadChemObject ( OBConversion * pConv )
virtual]
The "Convert" interface for reading a new molecule.

Reimplemented from OBFormat.

virtual bool WriteChemObject ( OBConversion * pConv ) [inline, virtual]


The "Convert" interface for writing a new molecule.

Detailed Description 685


Open Babel: API Documentation

Reimplemented from OBFormat.

bool DeferMolOutput ( OBMol * pmol,


OBConversion * pConv,
OBFormat * pF
) [static]
Defer output of a molecule until later, so it can be combined with others

Returns:
Success, or false if no molecule was read.

Instead of sending molecules for output via AddChemObject(), they are saved in here in OBMoleculeFormat
or discarded. By default they are saved only if they are in the first input file. Parts of subsequent molecules,
such as chemical structure, coordinates and OBGenericData can replace the parts in molecules with the same
title that have already been stored, subject to a set of rules. After all input files have been read, the stored
molecules (possibly now having augmented properties) are sent to the output format.

Is a static function with *this as parameter so that it can be called from other format classes like
XMLMoleculeFormat which are not derived from OBMoleculeFormat.

Referenced by OBMoleculeFormat::ReadChemObjectImpl().

bool OutputDeferredMols ( OBConversion * pConv ) [static]


Write out all molecules queued with DeferMolOutput.

Referenced by OBMoleculeFormat::WriteChemObjectImpl().

bool DeleteDeferredMols ( ) [static]


Delete the list of queued molecules from DeferMolOutput.

Referenced by OBMoleculeFormat::DeferMolOutput(), and OBMoleculeFormat::OutputDeferredMols().

OBMol * MakeCombinedMolecule ( OBMol * pFirst,


OBMol * pSecond
) [static]

Returns:
the OBMol which combines pFirst and pSecond (i.e.)

Makes a new OBMol on the heap by combining two molecules according to the rule below. If both have
OBGenericData of the same type, or OBPairData with the same attribute, the version from pFirst is used.
Returns a pointer to a new OBMol which will need deleting by the calling program (probably by being sent to
an output format). If the molecules cannot be regarded as being the same structure a NULL pointer is returned
and an error message logged.

Member Function Documentation 686


Open Babel: API Documentation

pFirst and pSecond and the objects they point to are not changed. (const modifiers difficult because class
OBMol not designed appropriately)

Combining molecules: rules for each of the three parts Title: Use the title of pFirst unless it has none, when
use that of pSecond. Warning if neither molecule has a title.

Structure

• a structure with atoms replaces one with no atoms


• a structure with bonds replaces one with no bonds, provided the formula is the same, else an error.
• structures with atoms and bonds are compared by InChI; error if not the same.
• a structure with 3D coordinates replaces one with 2D coordinates
• a structure with 2D coordinates replace one with 0D coordinates

OBGenericData OBPairData

Referenced by OBMoleculeFormat::DeferMolOutput().

bool ReadNameIndex ( NameIndexType & index,


const std::string & datafilename,
OBFormat * pInFormat
) [static]
Attempts to read the index file datafilename.obindx successively from the following directories:

• the current directory


• that in the environment variable BABEL_DATADIR or in the macro BABEL_DATADIR if the
environment variable is not set
• in a subdirectory of the BABEL_DATADIR directory with the version of OpenBabel as its name An
index of type NameIndexType is then constructed. NameIndexType is defined in obmolecformat.h
and may be a std::tr1::unordered_map (a hash_map) or std::map. In any case it is searched by
NameIndexType::iterator itr = index.find(molecule_name);
if(itr!=index.end())
unsigned pos_in_datafile = itr->second;

pos_in_datafile is used as a parameter in seekg() to read from the datafile

If no index is found, it is constructed from the datafile by reading all of it using the format pInFormat, and
written to the directory containing the datafile. This means that this function can be used without worrying
whether there is an index. It will be slow to execute the first time, but subsequent uses get the speed benefit of
indexed access to the datafile.

The serialization and de-serialization of the NameIndexType is entirely in this routine and could possibly be
improved. Currently re-hashing is done every time the index is read.

[inline,
const std::type_info& GetType ( void )
virtual]

Returns:

Member Function Documentation 687


Open Babel: API Documentation

the type of data converted by this format (here, OBMol)

Reimplemented from OBFormat.

const char* TypeID ( ) [inline, inherited]

Referenced by OBFormat::RegisterFormat().

virtual bool ReadMolecule ( OBBase * ,


OBConversion *
[inline, virtual,
)
inherited]
The "API" interface Read function.

Reads a single object. Does not make a new object on the heap; can be used with a pointer to an chem object
on the heap or the stack.

Reimplemented in XMLMoleculeFormat.

Referenced by OBMoleculeFormat::DeferMolOutput(), OBConversion::Read(), and


OBMoleculeFormat::ReadChemObjectImpl().

virtual bool WriteMolecule ( OBBase * ,


OBConversion *
[inline, virtual,
)
inherited]
The "API" interface Write function.

Writes a single object Does not delete the object; can be used with a pointer to an chem object on the heap or
the stack.

Returns:
false on error.

Referenced by OBMoleculeFormat::OutputDeferredMols(), OBConversion::Write(), and


OBMoleculeFormat::WriteChemObjectImpl().

virtual const char* Description ( ) [pure virtual, inherited]


Information on this format. Printed out in response to -Hxxx option where xxx id the id of the format.

Must be provided by each format class. Can include a list of command line Options. These may be used to
construction check boxes, radio buttons etc for GUI interface.

Reimplemented from OBPlugin.

Member Function Documentation 688


Open Babel: API Documentation

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(),


OBMoleculeFormat::OutputDeferredMols(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::RegisterOptionParam(), and OBMoleculeFormat::WriteChemObjectImpl().

const char * TargetClassDescription ( ) [virtual, inherited]


A decription of the chemical object converted by this format.

If not provided, the object type used by the default format is used (usually OBMol).

Referenced by OBConversion::ReportNumberConverted().

virtual const char* SpecificationURL ( ) [inline, virtual, inherited]


Web address where the format is defined.

Referenced by OBFormat::Display().

const char* GetMIMEType ( ) [inline, inherited]


Chemical MIME type associated with this file type (if any).

virtual unsigned int Flags ( ) [inline, virtual, inherited]


Decribes the capabilities of the format (Read only etc.).

Currently, can be a bitwise OR of any of the following NOTREADABLE READONEONLY


NOTWRITABLE WRITEONEONLY DEFAULTFORMAT READBINARY WRITEBINARY READXML

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBFormat::Display(),


OBConversion::FullConvert(), OBConversion::GetNextFormat(), OBConversion::InstallStreamFilter(),
OBConversion::OpenAndSetFormat(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::ReadFile(), OBFormat::RegisterFormat(), OBConversion::SetInFormat(),
OBConversion::SetOutFormat(), and OBConversion::WriteFile().

virtual int SkipObjects ( int ,


OBConversion *
) [inline, virtual, inherited]
Skip past first n objects in input stream (or current one with n=0).

Returns:
1 on success, -1 on error and 0 if not implemented

Reimplemented in XMLBaseFormat.

Referenced by OBConversion::Convert(), and OBConversion::SetStartAndEnd().

Member Function Documentation 689


Open Babel: API Documentation

[inline, virtual,
virtual OBFormat* MakeNewInstance ( )
inherited]

Returns:
a pointer to a new instance of the format, or NULL if fails. Normally a single global instance is used
but this may cause problems if there are member variables and the format is used in more than one
place in the program.

int RegisterFormat ( const char * ID,


MIME =
const char *
NULL
) [inherited]

Referenced by OBConversion::RegisterFormat().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]
Provides a description in txt of the format specified by itr. If param starts with "in", read", "out" or "write"
only the appropriate formats are output. The others return false. If param contains "verbose", the whole
description is output.

Reimplemented from OBPlugin.

[static,
OBFormat * FormatFromMIME ( const char * MIME )
inherited]

Referenced by OBConversion::FormatFromMIME().

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.

Referenced by OBConversion::LoadFormatFiles().

static OBPlugin* GetPlugin ( const char * Type,


const char * ID
)

Member Function Documentation 690


Open Babel: API Documentation

[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.

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().

Member Function Documentation 691


Open Babel: API Documentation

[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 Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following files:

Member Data Documentation 692


Open Babel: API Documentation

• obmolecformat.h
• obmolecformat.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 693


OBNasaThermoData Member List
This is the complete list of members for OBNasaThermoData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *parent) const OBNasaThermoData
virtual]
Coeffs OBNasaThermoData [protected]
[inline,
GetAttribute() const OBGenericData
virtual]
GetCoeff(unsigned n) const OBNasaThermoData [inline]
GetDataType() const OBGenericData [inline]
GetHiT() const OBNasaThermoData [inline]
GetLoT() const OBNasaThermoData [inline]
GetMidT() const OBNasaThermoData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetPhase() const OBNasaThermoData [inline]
[inline,
GetValue() const OBGenericData
virtual]
HiT OBNasaThermoData [protected]
LoT OBNasaThermoData [protected]
MidT OBNasaThermoData [protected]
OBGenericData(const std::string attr="undefined", const unsigned
int type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBNasaThermoData() OBNasaThermoData [inline]
phase OBNasaThermoData [protected]
SetAttribute(const std::string &v) OBGenericData [inline]
SetCoeff(unsigned n, const double val) OBNasaThermoData [inline]
SetHiT(double val) OBNasaThermoData [inline]
SetLoT(double val) OBNasaThermoData [inline]
SetMidT(double val) OBNasaThermoData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetPhase(char ph) OBNasaThermoData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

OBNasaThermoData Member List 694


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::OBNasaThermoData

OBNasaThermoData Member List 695


OBNasaThermoData Class Reference
Thermodynamic data in old style NASA polynomial form for OBMol. More...

#include <openbabel/kinetics.h>

Inheritance diagram for OBNasaThermoData:

[legend]

List of all members.

Public Member Functions


OBNasaThermoData ()
virtual OBGenericData * Clone (OBBase *parent) const
double GetCoeff (unsigned n) const
void SetCoeff (unsigned n, const double val)
double GetLoT () const
double GetMidT () const
double GetHiT () const
void SetLoT (double val)
void SetMidT (double val)
void SetHiT (double val)
char GetPhase () const
void SetPhase (char ph)
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
double Coeffs [14]
double LoT
double MidT
double HiT
char phase
std::string _attr
unsigned int _type

OBNasaThermoData Class Reference 696


Open Babel: API Documentation
DataOrigin _source

Detailed Description
Thermodynamic data in old style NASA polynomial form for OBMol.

This is a venerable data format used to describe specific heats, enthalpies and entropies, particularly in the gas
phase and at high temperatures. There is a standard datafile with fixed format (for punched cards!) which can
be read and written to this OBMol extension using the thermo format. It is also used in chemkin format and in
cmlreact format For a brief description of the meaning of the coefficients see
http://www.me.berkeley.edu/gri_mech/data/nasa_plnm.html The first 7 coefficients are for the high
temperature range MidT to HiT; and the second 7 are for the low temperature range LoT to MidT Note that
there is a more modern NASA polynomial with more terms, which is not supported here.

Constructor & Destructor Documentation

OBNasaThermoData ( ) [inline]

Referenced by OBNasaThermoData::Clone().

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * parent ) const [inline, virtual]

Reimplemented from OBGenericData.

double GetCoeff ( unsigned n ) const [inline]

void SetCoeff ( unsigned n,


const double val
) [inline]

double GetLoT ( ) const [inline]

const
double GetMidT ( )
[inline]

double GetHiT ( ) const [inline]

Protected Attributes 697


Open Babel: API Documentation

void SetLoT ( double val ) [inline]

void SetMidT ( double val ) [inline]

void SetHiT ( double val ) [inline]

char GetPhase ( ) const [inline]

void SetPhase ( char ph ) [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().

[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]

Member Function Documentation 698


Open Babel: API Documentation

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

double Coeffs[14] [protected]

Referenced by OBNasaThermoData::GetCoeff(), and OBNasaThermoData::SetCoeff().

double LoT [protected]

Referenced by OBNasaThermoData::GetLoT(), and OBNasaThermoData::SetLoT().

double MidT [protected]

Referenced by OBNasaThermoData::GetMidT(), and OBNasaThermoData::SetMidT().

double HiT [protected]

Referenced by OBNasaThermoData::GetHiT(), and OBNasaThermoData::SetHiT().

char phase [protected]

Referenced by OBNasaThermoData::GetPhase(), and OBNasaThermoData::SetPhase().

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().

Member Data Documentation 699


Open Babel: API Documentation

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:

• kinetics.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 Data Documentation 700


OBOp Member List
This is the complete list of members for OBOp, including all inherited members.

_id OBPlugin [protected]


[inline, protected,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin
static]
Begin(const char *PluginID) OBPlugin [inline, static]
Description() OBPlugin [inline, virtual]
Display(std::string &txt, const char *param, const char
OBPlugin [virtual]
*ID=NULL)
Do(OBBase *pOb, OpMap *pOptions=NULL, const char
OBOp [pure virtual]
*OptionText=NULL)=0
DoOps(OBBase *pOb, OpMap *pOptions) OBOp [inline, static]
End(const char *PluginID) OBPlugin [inline, static]
FirstLine(const char *txt) OBPlugin [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetPlugin(const char *Type, const char *ID) OBPlugin [inline, static]
GetTypeMap(const char *PluginID) OBPlugin [protected, 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]
OpMap typedef OBOp
OpOptions(OBBase *pOb) OBOp [inline, static]
PluginIterator typedef OBPlugin
[inline, protected,
PluginMap() OBPlugin
static]
PluginMapType typedef OBPlugin
TypeID() OBOp [inline, virtual]
WorksWith(OBBase *pOb) const =0 OBOp [pure virtual]
~OBPlugin() OBPlugin [inline, virtual]

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

OBOp Member List 701


Open Babel: API Documentation

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::OBOp

OBOp Member List 702


OBOp Class Reference
Operations to modify molecules before output. More...

#include <openbabel/op.h>

Inheritance diagram for OBOp:

[legend]

List of all members.

Public Types
typedef const std::map
< std::string, std::string > OpMap
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


virtual const char * TypeID ()
virtual bool Do (OBBase *pOb, OpMap *pOptions=NULL, const char
*OptionText=NULL)=0
virtual bool WorksWith (OBBase *pOb) const =0
virtual const char * Description ()
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static std::string OpOptions (OBBase *pOb)
static bool DoOps (OBBase *pOb, OpMap *pOptions)
static OBPlugin * GetPlugin (const char *Type, const char *ID)

OBOp Class Reference 703


Open Babel: API Documentation
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 PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
const char * _id

Detailed Description
Operations to modify molecules before output.

Since:
version 2.2

Classes derived from OBOp implement options for the babel program (for both its commandline and GUI
interfaces). It is intended for options that carry out some modification on the molecule(or reaction) after it has
been input, but before it is output. An example is the --center option implemented in the OpCenter class in
ops.cpp, which is a duplicate of the built in -c option for centering coordinates.

The advantage of plugin classes is that no existing code has to be modified when a new class is added. You
can list those that are present by babel -L ops or from a menu item in the GUI.

Any OBOp derived class has to have a constructor, a function returning a short description, and a Do()
function which does the work. It also needs a WorksWith() function which is always the same when operating
on OBMol objects. (It is not made a default to reducecode dependencies.) A single global instance of the class
needs to be instantiated to define the ID, by which the class is subsequently accessed.

OBOp works by two of its static functions being called from code in transform.cpp:

• OpOptions(OBBase* pOb, OpMap* pOptions) returns a string describing each of the derivated
classes relevant to objects of the class of the OBBase parameter, for use in the help text and to set
checkboxes in the GUI;
• DoOps(OBBase* pOb) applies each option whose ID is listed in the Opmap parameter to the object
(ususally an OBMol) in the OBBase parameter.

Static Public Member Functions 704


Open Babel: API Documentation

Options which need parameters are passed these (space delimited) in the text parameter of the Do() function.
They can also access other general options specified on the command line by examining the the OpMap
parameter.

To use an OBOp class from the API it is necessary to use an extra step in case it isn't present. So to apply the
OBOp clas with ID gen3D to your mol

OBOp* pOp = OBOp::FindType("gen3D"); if(!pOp) ...report error pOp->Do(mol);

Member Typedef Documentation

typedef const std::map<std::string, std::string> OpMap

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Member Function Documentation

[inline,
virtual const char* TypeID ( )
virtual]
Provides the name of this kind of plugin. Use -L "ops" to list from commandline.

virtual bool Do ( OBBase * pOb,


OpMap * pOptions = NULL,
const char * OptionText = NULL
) [pure virtual]
Required function that does the work. Normally return true, unless object is not to be output.

Implemented in OpTransform.

Referenced by OBOp::DoOps().

const [pure
virtual bool WorksWith ( OBBase * pOb )
virtual]

Returns:
true if this op is designed to work with the class of pOb, e.g. OBMol

Implemented in OpTransform.

Referenced by OBOp::OpOptions().

Detailed Description 705


Open Babel: API Documentation

static std::string OpOptions ( OBBase * pOb ) [inline, static]

Returns:
string describing options, for display with -H and to make checkboxes in GUI

Referenced by OBMol::ClassDescription().

static bool DoOps ( OBBase * pOb,


OpMap * pOptions
) [inline, static]
Call Do() of all the OBOps whose ID is a key in the map. Called from Transform(). The map has general
options like -x or --multicharoption The key is the option name and the value, if any, is text which follows the
option name. In some cases, there may be several parameters, space separated)

Returns:
false indicating object should not be output, if any Do() returns false

Referenced by OBMol::DoTransformations().

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().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]
Write information on a plugin class to the string txt. Return false if not written. The default implementation
outputs: the ID, a tab character, and the first line of the Description. The param string can be used in derived
types to provide different outputs.

Reimplemented in OBDescriptor, and OBFormat.

Referenced by OBDescriptor::Display().

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 706


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 707


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 708


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 file:

• op.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:58 2008 by 1.5.6.

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

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

Member Data Documentation 709


OBPairData Member List
This is the complete list of members for OBPairData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_value OBPairData [protected]
[inline,
Clone(OBBase *) const OBPairData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBPairData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBPairData() OBPairData
SetAttribute(const std::string &v) OBGenericData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetValue(const char *v) OBPairData [inline]
SetValue(const std::string &v) OBPairData [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.

• Main Page
• Related Pages

OBPairData Member List 710


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

OpenBabel::OBPairData

OBPairData Member List 711


OBPairData Class Reference
Used to store arbitrary text attribute/value relationships. More...

#include <openbabel/generic.h>

Inheritance diagram for OBPairData:

[legend]

List of all members.

Public Member Functions


OBPairData ()
virtual OBGenericData * Clone (OBBase *) const
void SetValue (const char *v)
void SetValue (const std::string &v)
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 _value
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to store arbitrary text attribute/value relationships.

Ideal for arbitrary text descriptors for molecules, atoms, bonds, residues, e.g. in QSAR.

OBPairData Class Reference 712


Open Babel: API Documentation

Constructor & Destructor Documentation

OBPairData ( )

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetValue ( const char * v ) [inline]

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

void SetValue ( const std::string & v ) [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.

Referenced by OBMol::GetFormula().

[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().

Constructor & Destructor Documentation 713


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 DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::string _value [protected]


The data for this key/value pair.

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 Function Documentation 714


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 715


OBPairTemplate Member List
This is the complete list of members for OBPairTemplate, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_value OBPairTemplate [protected]
[inline,
Clone(OBBase *) const OBGenericData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetGenericValue() const OBPairTemplate
virtual]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBPairTemplate() OBPairTemplate[inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetValue(const ValueT t) OBPairTemplate[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.

• Main Page

OBPairTemplate Member List 716


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

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

OpenBabel::OBPairTemplate

OBPairTemplate Member List 717


OBPairTemplate Class Template Reference
Used to store arbitrary attribute/value relationsips of any type. More...

#include <openbabel/generic.h>

Inheritance diagram for OBPairTemplate:

[legend]

List of all members.

Public Member Functions


OBPairTemplate ()
void SetValue (const ValueT t)
virtual const ValueT & GetGenericValue () const
virtual OBGenericData * Clone (OBBase *) 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
ValueT _value
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
template<class ValueT>
class OpenBabel::OBPairTemplate< ValueT >

Used to store arbitrary attribute/value relationsips of any type.

OBPairTemplate Class Template Reference 718


Open Babel: API Documentation

Constructor & Destructor Documentation

OBPairTemplate ( ) [inline]

Member Function Documentation

void SetValue ( const ValueT t ) [inline]

const [inline,
virtual const ValueT& GetGenericValue ( )
virtual]

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual, inherited]

Reimplemented in AliasData, OBAtomClassData, OBCommentData, OBExternalBondData, OBPairData,


OBSetData, OBVirtualBond, OBRingData, OBUnitCell, OBConformerData, OBSymmetryData,
OBTorsionData, OBAngleData, OBChiralData, OBSerialNums, OBVibrationData, OBRotationData,
OBVectorData, OBMatrixData, OBRateData, OBNasaThermoData, and OBRotamerList.

Referenced by OBBase::CloneData(), and OBMoleculeFormat::MakeCombinedMolecule().

[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

Constructor & Destructor Documentation 719


Open Babel: API Documentation

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

ValueT _value [protected]


The data for this key/value pair.

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:

• generic.h

Member Function Documentation 720


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 721


OBPhModel Member List
This is the complete list of members for OBPhModel, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignSeedPartialCharge(OBMol &) OBPhModel
CorrectForPH(OBMol &, double pH=7.4) OBPhModel
GetSize() OBPhModel [inline, virtual]
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
OBPhModel() OBPhModel
ParseLine(const char *) OBPhModel [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]
~OBPhModel() OBPhModel

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

OBPhModel Member List 722


Open Babel: API Documentation

• Class Hierarchy
• Class Members

OpenBabel::OBPhModel

OBPhModel Member List 723


OBPhModel Class Reference
Corrections for pH used by OBMol::CorrectForPH(). More...

#include <phmodel.h>

Inheritance diagram for OBPhModel:

[legend]

List of all members.

Public Member Functions


OBPhModel ()
~OBPhModel ()
void ParseLine (const char *)
unsigned int GetSize ()
void AssignSeedPartialCharge (OBMol &)
void CorrectForPH (OBMol &, double pH=7.4)
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
Corrections for pH used by OBMol::CorrectForPH().

The data/phmodel.txt file contains transformations which are applied to correct the charges for a given pH.
This function uses the Henderson-Hasselbalch equation to calculate which species (protonated/ unprotonated)
is present in the highest concentration at the given pH.

OBPhModel Class Reference 724


Open Babel: API Documentation

For acids an entry would look like:

# carboxylic acid
O=C[OD1:1] >> O=C[O-:1] 4.0

The 4.0 is the pKa for the dissociation [HA] -> [H+] + [A-]. To calculate [HA]/[A-] we use:

[HA] / [A-] = 10^(pKa - pH)

[HA]/[A-] > 1 : [HA] > [A-]


[HA]/[A-] < 1 : [A-] > [HA]

For a base, an entry would look be:

# methyl amine
C[N:1] >> C[N+:1] 10.7

Here, the 10.7 is the pKa for the dissociation [BH+] -> [H+] + [B:]. To calculate [BH+]/[B:] we use:

[BH+] / [B:] = 10^(pKa - pH)

[BH+]/[B:] > 1 : [BH+] > [B:]


[BH+]/[B:] < 1 : [B:] > [BH+]

The transformations are all applied (if needed at the specified pH value) in the same order they are found in
data/phmodel.txt.

Constructor & Destructor Documentation

OBPhModel ( )

~OBPhModel ( )

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 chemical transformations

Reimplemented from OBGlobalDataBase.

Detailed Description 725


Open Babel: API Documentation

OBMol
void AssignSeedPartialCharge ( mol )
&

Referenced by OBAtom::GetPartialCharge().

void CorrectForPH ( OBMol & mol,


pH =
double
7.4
)

Referenced by OBMol::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(),

Member Function Documentation 726


Open Babel: API Documentation

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.

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).

Member Data Documentation 727


Open Babel: API Documentation

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:

• 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
• Namespaces
• Classes
• Files

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

Member Data Documentation 728


OBPlugin Member List
This is the complete list of members for OBPlugin, including all inherited members.

_id OBPlugin [protected]


[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
[inline,
Begin(const char *PluginID) OBPlugin
static]
[inline,
Description() OBPlugin
virtual]
Display(std::string &txt, const char *param, const char *ID=NULL) OBPlugin [virtual]
[inline,
End(const char *PluginID) OBPlugin
static]
FirstLine(const char *txt) OBPlugin [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
List(const char *PluginID, const char *param=NULL, std::ostream
OBPlugin [static]
*os=&std::cout)
ListAsString(const char *PluginID, const char *param=NULL) OBPlugin [static]
ListAsVector(const char *PluginID, const char *param, std::vector<
OBPlugin [static]
std::string > &vlist)
[inline,
MakeInstance(const std::vector< std::string > &) OBPlugin
virtual]
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
[inline,
~OBPlugin() OBPlugin
virtual]

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

OBPlugin Member List 729


Open Babel: API Documentation

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::OBPlugin

OBPlugin Member List 730


OBPlugin Class Reference
Base class for all types of dynamic classes discovered at runtime. More...

#include <openbabel/plugin.h>

Inheritance diagram for OBPlugin:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


virtual ~OBPlugin ()
virtual const char * Description ()
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


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)

OBPlugin Class Reference 731


Open Babel: API Documentation

static PluginIterator End (const char *PluginID)

Static Protected Member Functions


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 all types of dynamic classes discovered at runtime.

Since:
version 2.2

See also:
plugin.h

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType

typedef PluginMapType::const_iterator PluginIterator

Constructor & Destructor Documentation

virtual ~OBPlugin ( ) [inline, virtual]


Virtual destructor necessary for classes with virtual functions.

Member Function Documentation

virtual const char* Description ( ) [inline, virtual]


Required description of a sub-type.

Reimplemented in OBFormat, OBGroupContrib, and OpTransform.

Referenced by OBPlugin::Display(), and OBOp::OpOptions().

Static Public Member Functions 732


Open Babel: API Documentation

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual]
Write information on a plugin class to the string txt. Return false if not written. The default implementation
outputs: the ID, a tab character, and the first line of the Description. The param string can be used in derived
types to provide different outputs.

Reimplemented in OBDescriptor, and OBFormat.

Referenced by OBDescriptor::Display().

virtual OBPlugin* MakeInstance ( const std::vector< std::string > & ) [inline, virtual]
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.

Referenced by OBConversion::LoadFormatFiles().

static OBPlugin* GetPlugin ( const char * Type,


const char * ID
) [inline, static]
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]


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<
vlist
std::string > &
) [static]
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().

Member Function Documentation 733


Open Babel: API Documentation

void List ( const char * PluginID,


const char * param = NULL,
std::ostream * os = &std::cout
) [static]
As ListAsVector but sent to an ostream with a default of cout if not specified.

Referenced by OBPlugin::ListAsString().

string ListAsString ( const char * PluginID,


param =
const char *
NULL
) [static]
As ListAsVector but returns a string containing the list.

string FirstLine ( const char * txt ) [static]


Utility function to return only the first line of a string.

Referenced by OBPlugin::Display(), OBFormat::Display(), and OBOp::OpOptions().

[inline,
static PluginIterator Begin ( const char * PluginID )
static]
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]

Referenced by OBConversion::GetNextFormat(), and OBOp::OpOptions().

const [pure
virtual PluginMapType& GetMap ( )
virtual]
Returns the map of the subtypes.

Referenced by OBFormat::RegisterFormat().

static PluginMapType& PluginMap ( ) [inline, static, protected]


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().

Member Function Documentation 734


Open Babel: API Documentation

[static,
OBPlugin::PluginMapType & GetTypeMap ( const char * PluginID )
protected]
Returns the map of a particular plugin type, e.g. GetMapType("fingerprints").

static OBPlugin* BaseFindType ( PluginMapType & Map,


const char * ID
) [inline, static, protected]
Returns the type with the specified ID, or NULL if not found. Will be cast to the appropriate class in the
calling routine.

Member Data Documentation

const char* _id [protected]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following files:

• plugin.h
• plugin.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 735


OBPointGroup Member List
This is the complete list of members for OBPointGroup, including all inherited members.

d OBPointGroup [protected]
IdentifyPointGroup() OBPointGroup
OBPointGroup() OBPointGroup
Setup(OBMol *) OBPointGroup
~OBPointGroup() OBPointGroup

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::OBPointGroup

OBPointGroup Member List 736


OBPointGroup Class Reference
Brute-force point group symmetry perception. More...

#include <openbabel/pointgroup.h>

List of all members.

Public Member Functions


OBPointGroup ()
~OBPointGroup ()
void Setup (OBMol *)
const char * IdentifyPointGroup ()

Protected Attributes
PointGroupPrivate * d

Detailed Description
Brute-force point group symmetry perception.

Since:
version 2.2

This class performs brute-force point group symmetry perception to yield symmetry identifiers. In the future,
this should provide optimized symmetry-derived coordinates as well.

Constructor & Destructor Documentation

OBPointGroup ( )

~OBPointGroup ( )

Member Function Documentation

void Setup ( OBMol * mol )


Set the point group detection for this molecule.

OBPointGroup Class Reference 737


Open Babel: API Documentation

const char * IdentifyPointGroup ( )

Returns:
the 3D point group symbol for this molecule

Member Data Documentation

PointGroupPrivate* d [protected]

Referenced by OBPointGroup::IdentifyPointGroup(), OBPointGroup::OBPointGroup(),


OBPointGroup::Setup(), and OBPointGroup::~OBPointGroup().

The documentation for this class was generated from the following files:

• pointgroup.h
• pointgroup.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 Function Documentation 738


OBProxGrid Member List
This is the complete list of members for OBProxGrid, including all inherited members.

_gridtype OBProxGrid [protected]


_inc OBProxGrid [protected]
_maxinc OBProxGrid [protected]
_nxinc OBProxGrid [protected]
_nyinc OBProxGrid [protected]
_nzinc OBProxGrid [protected]
_vdata OBBase [protected]
_xmax OBGrid [protected]
_xmin OBGrid [protected]
_ymax OBGrid [protected]
_ymin OBGrid [protected]
_zmax OBGrid [protected]
_zmin OBGrid [protected]
BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
cell OBProxGrid [protected]
[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
GetProxVector(double, double, double) OBProxGrid
GetProxVector(double *) OBProxGrid
GetXmax() const OBGrid [inline]
GetXmin() const OBGrid [inline]

OBProxGrid Member List 739


Open Babel: API Documentation

GetYmax() const OBGrid [inline]


GetYmin() const OBGrid [inline]
GetZmax() const OBGrid [inline]
GetZmin() const OBGrid [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
Init(OBMol &box) OBGrid [virtual]
LipoGrid() OBProxGrid [inline]
OBGrid() OBGrid [inline]
OBProxGrid(int gridtype=0) OBProxGrid [inline]
PointIsInBox(double x, double y, double z) OBGrid [inline]
PointIsInBox(double *c) OBGrid [inline]
PointIsInBox(vector3 v) OBGrid [inline]
PolarGrid() OBProxGrid [inline]
SetData(OBGenericData *d) OBBase [inline]
SetGridType(int gridtype) OBProxGrid [inline]
Setup(OBMol &mol, OBMol &box, double cutoff, double
OBProxGrid
resolution=0.5)
Setup(OBMol &mol, OBMol &box, double cutoff, std::vector< bool >
OBProxGrid
&use, double resolution=0.5)
[inline,
~OBBase() OBBase
virtual]
~OBProxGrid() OBProxGrid [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

OBProxGrid Member List 740


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBProxGrid

OBProxGrid Member List 741


OBProxGrid Class Reference
A grid for determining the proximity of a given point to atoms in an OBMol. More...

#include <openbabel/grid.h>

Inheritance diagram for OBProxGrid:

[legend]

List of all members.

Public Member Functions


OBProxGrid (int gridtype=0)
~OBProxGrid ()
void Setup (OBMol &mol, OBMol &box, double cutoff, double
resolution=0.5)
void Setup (OBMol &mol, OBMol &box, double cutoff, std::vector< bool >
&use, double resolution=0.5)
std::vector< int > * GetProxVector (double, double, double)
std::vector< int > * GetProxVector (double *)
bool LipoGrid ()
bool PolarGrid ()
void SetGridType (int gridtype)
virtual void Init (OBMol &box)
double GetXmin () const
double GetYmin () const
double GetZmin () const
double GetXmax () const
double GetYmax () const
double GetZmax () const
bool PointIsInBox (double x, double y, double z)
bool PointIsInBox (double *c)
bool PointIsInBox (vector3 v)
virtual bool Clear ()
virtual OBBase * DoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)

OBProxGrid Class Reference 742


Open Babel: API Documentation
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 ()

Protected Attributes
int _gridtype
int _nxinc
int _nyinc
int _nzinc
int _maxinc
double _inc
std::vector< std::vector< int > > cell
double _xmin
double _xmax
double _ymin
double _ymax
double _zmin
double _zmax
std::vector< OBGenericData * > _vdata

Detailed Description
A grid for determining the proximity of a given point to atoms in an OBMol.

Deprecated:
May be removed in the future, since docking is not a key feature

Public Member Functions 743


Open Babel: API Documentation

Constructor & Destructor Documentation

OBProxGrid ( int gridtype = 0 ) [inline]

~OBProxGrid ( ) [inline]

Member Function Documentation

void Setup ( OBMol & mol,


OBMol & box,
double cutoff,
resolution =
double
0.5
)

void Setup ( OBMol & mol,


OBMol & box,
double cutoff,
std::vector< bool > & use,
double resolution = 0.5
)

vector< int > * GetProxVector ( double x,


double y,
double z
)

Referenced by OBProxGrid::GetProxVector().

vector< int > * GetProxVector ( double * c )

bool LipoGrid ( ) [inline]

bool PolarGrid ( ) [inline]

void SetGridType ( int gridtype ) [inline]

Constructor & Destructor Documentation 744


Open Babel: API Documentation

void Init ( OBMol & box ) [virtual, inherited]


Initialize the grid based on a box around the molecule box Subclasses should overload this method -- this
only tracks the dimension of the box itself.

Referenced by OBFloatGrid::Init(), and OBProxGrid::Setup().

const [inline,
double GetXmin ( )
inherited]

Returns:
the minimum x point of the grid

const [inline,
double GetYmin ( )
inherited]

Returns:
the minimum y point of the grid

double GetZmin ( ) const [inline, inherited]

Returns:
the minimum z point of the grid

double GetXmax ( ) const [inline, inherited]

Returns:
the maximum x point of the grid

double GetYmax ( ) const [inline, inherited]

Returns:
the maximum y point of the grid

double GetZmax ( ) const [inline, inherited]

Returns:
the maximum z point of the grid

bool PointIsInBox ( double x,


double y,
double z

Member Function Documentation 745


Open Babel: API Documentation

) [inline, inherited]

Returns:
whether the supplied XYZ coordinates fall within the box

Referenced by OBProxGrid::Setup().

bool PointIsInBox ( double * c ) [inline, inherited]

Returns:
true if the point falls within the box

bool PointIsInBox ( vector3 v ) [inline, inherited]

Returns:
true if the point falls within the box

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.

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]

Member Function Documentation 746


Open Babel: API Documentation

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

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.

Member Function Documentation 747


Open Babel: API Documentation

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:
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

Member Function Documentation 748


Open Babel: API Documentation

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

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]

Member Function Documentation 749


Open Babel: API Documentation

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

int _gridtype [protected]

int _nxinc [protected]

Referenced by OBProxGrid::Setup().

int _nyinc [protected]

Referenced by OBProxGrid::GetProxVector(), and OBProxGrid::Setup().

int _nzinc [protected]

Referenced by OBProxGrid::GetProxVector(), and OBProxGrid::Setup().

int _maxinc [protected]

Referenced by OBProxGrid::GetProxVector(), and OBProxGrid::Setup().

double _inc [protected]

Referenced by OBProxGrid::GetProxVector(), and OBProxGrid::Setup().

std::vector<std::vector<int> > cell [protected]

Referenced by OBProxGrid::GetProxVector(), and OBProxGrid::Setup().

double _xmin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

Member Data Documentation 750


Open Babel: API Documentation

double _xmax [protected, inherited]

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _ymax [protected, inherited]

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmin [protected, inherited]

Referenced by OBFloatGrid::CoordsToIndex(), OBProxGrid::GetProxVector(),


OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Interpolate(),
OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(), OpenBabel::operator>>(),
OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

double _zmax [protected, inherited]


the min/max axes in XYZ axes (i.e., the box)

Referenced by OBProxGrid::GetProxVector(), OBFloatGrid::Init(), OBGrid::Init(), OBFloatGrid::Inject(),


OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OpenBabel::operator<<(),
OpenBabel::operator>>(), OBFloatGrid::SetLimits(), and OBProxGrid::Setup().

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:

• grid.h
• grid.cpp

Member Data Documentation 751


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 752


OBRTree Member List
This is the complete list of members for OBRTree, including all inherited members.

GetAtomIdx() OBRTree
OBRTree(OBAtom *, OBRTree *) OBRTree
PathToRoot(std::vector< OBAtom * > &) OBRTree
~OBRTree() OBRTree [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::OBRTree

OBRTree Member List 753


OBRTree Class Reference
Internal class for OBRing search algorithms to create a search tree of OBAtom objects. More...

#include <openbabel/ring.h>

List of all members.

Public Member Functions


OBRTree (OBAtom *, OBRTree *)
~OBRTree ()
int GetAtomIdx ()
void PathToRoot (std::vector< OBAtom * > &)

Detailed Description
Internal class for OBRing search algorithms to create a search tree of OBAtom objects.

Constructor & Destructor Documentation

OBRTree ( OBAtom * atom,


OBRTree * prv
)
Construct a search tree from a possible parent entry and atom entry.

~OBRTree ( ) [inline]

Member Function Documentation

int GetAtomIdx ( )

Returns:
the OBAtom::GetIdx() index of the atom in this node

void PathToRoot ( std::vector< OBAtom * > & path )


Recursively find the root of this tree, building up a vector of OBAtom nodes.

The supplied path is built up of OBAtom nodes, with the root atom the last item in the vector.

OBRTree Class Reference 754


Open Babel: API Documentation

Referenced by OBRTree::PathToRoot().

The documentation for this class was generated from the following files:

• ring.h
• ring.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 Function Documentation 755


OBRandom Member List
This is the complete list of members for OBRandom, including all inherited members.

NextFloat() OBRandom
NextInt() OBRandom
OBRandom(bool useSys=false) OBRandom
Seed(int seed) OBRandom [inline]
TimeSeed() OBRandom

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::OBRandom

OBRandom Member List 756


OBRandom Class Reference
Random number generator. More...

#include <openbabel/rand.h>

List of all members.

Public Member
Functions
OBRandom (bool useSys=false)
void Seed (int seed)
void TimeSeed ()
int NextInt ()
double NextFloat ()

Detailed Description
Random number generator.

The OBRandom class can be used to facilitate cross-platform random number generation. The class can be set
to specific seed states, or set to use the current time or other arbitrary data as a seed.

OBRandom generator; // Don't use system rand() functions


generator.TimeSeed(); // initialize from the current time

cerr << " New Random Integer " << generator.NextInt() << endl;
cerr << " New Random Floating-Point " << generator.NextFloat() << endl;

Alternatively, OBRandom can be used as an interface to the system random number generator.

OBRandom generator(true); // Use system rand() functions


generator.Seed(10246);// Use a specific initial seed value for reproducing sequence

Constructor & Destructor Documentation

OBRandom ( bool useSys = false )


Constructor. useSys will use the system rand() function.

Member Function Documentation

void Seed ( int seed ) [inline]


Use seed for the random number generator seed.

OBRandom Class Reference 757


Open Babel: API Documentation

void TimeSeed ( )
Use the current time for the random number generator seed If sranddev is available (e.g., Mac OS X, BSD...)
use this instead for more random seeds

Referenced by OBForceField::GenerateVelocities(), OBForceField::RandomRotorSearchInitialize(),


vector3::randomUnitVector(), and OBForceField::WeightedRotorSearch().

int NextInt ( )

Returns:
a random integer

Referenced by OBForceField::RandomRotorSearchInitialize().

double NextFloat ( )

Returns:
a random floating-point number between 0.0 and 1.0

Referenced by OBForceField::GenerateVelocities(), matrix3x3::randomRotation(),


vector3::randomUnitVector(), and OBForceField::WeightedRotorSearch().

The documentation for this class was generated from the following files:

• rand.h
• rand.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

Member Function Documentation 758


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 759


OBRateData Member List
This is the complete list of members for OBRateData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
A enum value OBRateData
ARRHENIUS enum value OBRateData
[inline,
Clone(OBBase *parent) const OBRateData
virtual]
E enum value OBRateData
Efficiencies OBRateData [protected]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
GetEfficiency(std::string id) OBRateData [inline]
GetLoRate(rate_type n) const OBRateData [inline]
GetNextEff(std::string &id, double &Eff) OBRateData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetRate(rate_type n) const OBRateData [inline]
GetTroeParam(int n) const OBRateData [inline]
[inline,
GetValue() const OBGenericData
virtual]
LINDERMANN enum value OBRateData
LoRates OBRateData [protected]
n enum value OBRateData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBRateData() OBRateData [inline]
rate_type enum name OBRateData
Rates OBRateData [protected]
reaction_type enum name OBRateData
ReactionType OBRateData
SetAttribute(const std::string &v) OBGenericData [inline]
SetEfficiency(std::string id, double Eff) OBRateData [inline]
SetLoRate(rate_type n, const double val) OBRateData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetRate(rate_type n, const double val) OBRateData [inline]
SetTroeParams(int n, const double val) OBRateData [inline]
SRI enum value OBRateData

OBRateData Member List 760


Open Babel: API Documentation

THREEBODY enum value OBRateData


TROE enum value OBRateData
TroeParams OBRateData [protected]
[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:57 2008 by 1.5.6.

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

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

OpenBabel::OBRateData

OBRateData Member List 761


OBRateData Class Reference
Holds rate constant data for OBReaction. More...

#include <openbabel/kinetics.h>

Inheritance diagram for OBRateData:

[legend]

List of all members.

Public Types
enum rate_type { A, n, E }
enum reaction_type {
ARRHENIUS = 55555, LINDERMANN, TROE, SRI,
THREEBODY
}

Public Member Functions


virtual OBGenericData * Clone (OBBase *parent) const
OBRateData ()
double GetRate (rate_type n) const
void SetRate (rate_type n, const double val)
double GetLoRate (rate_type n) const
void SetLoRate (rate_type n, const double val)
double GetTroeParam (int n) const
void SetTroeParams (int n, const double val)
void SetEfficiency (std::string id, double Eff)
double GetEfficiency (std::string id)
bool GetNextEff (std::string &id, double &Eff)
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

OBRateData Class Reference 762


Open Babel: API Documentation

Public Attributes
reaction_type ReactionType

Protected Attributes
double Rates [3]
double LoRates [3]
double TroeParams [4]
std::map< std::string, double > Efficiencies
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Holds rate constant data for OBReaction.

The data is in a form used by CHEMKIN, at least the original free versions developed by Sandia Labs.
Cantera is a GPL chemical kinetics program with similar capabilities. Used by chemkin format and cml
reaction format

Member Enumeration Documentation

enum rate_type

Enumerator:
A
n
E

enum reaction_type

Enumerator:
ARRHENIUS
LINDERMANN
TROE
SRI
THREEBODY

Constructor & Destructor Documentation

OBRateData ( ) [inline]

Public Attributes 763


Open Babel: API Documentation
Referenced by OBRateData::Clone().

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * parent ) const [inline, virtual]

Reimplemented from OBGenericData.

const
double GetRate ( rate_type n )
[inline]

void SetRate ( rate_type n,


const double val
) [inline]

const
double GetLoRate ( rate_type n )
[inline]

void SetLoRate ( rate_type n,


const double val
) [inline]

const
double GetTroeParam ( int n )
[inline]

void SetTroeParams ( int n,


const double val
) [inline]

void SetEfficiency ( std::string id,


double Eff
) [inline]

double GetEfficiency ( std::string id ) [inline]

bool GetNextEff ( id,

Constructor & Destructor Documentation 764


Open Babel: API Documentation

std::string
&
double & Eff
) [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().

[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 Function Documentation 765


Open Babel: API Documentation

Member Data Documentation

double Rates[3] [protected]

Referenced by OBRateData::GetRate(), OBRateData::OBRateData(), and OBRateData::SetRate().

double LoRates[3] [protected]

Referenced by OBRateData::GetLoRate(), OBRateData::OBRateData(), and OBRateData::SetLoRate().

double TroeParams[4] [protected]

Referenced by OBRateData::GetTroeParam(), OBRateData::OBRateData(), and


OBRateData::SetTroeParams().

std::map<std::string,double> Efficiencies [protected]

Referenced by OBRateData::GetEfficiency(), OBRateData::GetNextEff(), and OBRateData::SetEfficiency().

reaction_type ReactionType

Referenced by OBRateData::OBRateData().

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:

Member Data Documentation 766


Open Babel: API Documentation

• kinetics.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 Data Documentation 767


OBReaction Member List
This is the complete list of members for OBReaction, including all inherited members.

_vdata OBBase [protected]


AddAgent(const std::tr1::shared_ptr< OBMol > sp) OBReaction [inline]
AddProduct(const std::tr1::shared_ptr< OBMol > sp) OBReaction [inline]
AddReactant(const std::tr1::shared_ptr< OBMol > sp) OBReaction [inline]
BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
[inline,
ClassDescription() OBReaction
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]
GetAgent() const OBReaction [inline]
GetAllData(const unsigned int type) OBBase
GetComment() const OBReaction [inline]
GetData(const unsigned int type) OBBase
GetData(const std::string &) OBBase
GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
GetProduct(const unsigned i) OBReaction [inline]
GetReactant(const unsigned i) OBReaction [inline]
GetTitle() const OBReaction [inline]
GetTransitionState() const OBReaction [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
IsReversible() const OBReaction [inline]
NumProducts() const OBReaction [inline]
NumReactants() const OBReaction [inline]
OBReaction() OBReaction [inline]
SetComment(const std::string &comment) OBReaction [inline]

OBReaction Member List 768


Open Babel: API Documentation

SetData(OBGenericData *d) OBBase [inline]


SetReversible(bool b=true) OBReaction [inline]
SetTitle(const std::string &title) OBReaction [inline]
SetTransitionState(const std::tr1::shared_ptr< OBMol > sp) OBReaction [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:


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::OBReaction

OBReaction Member List 769


OBReaction Class Reference
Used to store chemical reactions (i.e., reactants -> products). More...

#include <reaction.h>

Inheritance diagram for OBReaction:

[legend]

List of all members.

Public Member Functions


OBReaction ()
int NumReactants () const
int NumProducts () const
void AddReactant (const std::tr1::shared_ptr< OBMol > sp)
void AddProduct (const std::tr1::shared_ptr< OBMol > sp)
void SetTransitionState (const std::tr1::shared_ptr< OBMol > sp)
void AddAgent (const std::tr1::shared_ptr< OBMol > sp)
std::tr1::shared_ptr< OBMol > GetReactant (const unsigned i)
std::tr1::shared_ptr< OBMol > GetProduct (const unsigned i)
std::tr1::shared_ptr< OBMol > GetTransitionState () const
std::tr1::shared_ptr< OBMol > GetAgent () const
std::string GetTitle () const
std::string GetComment () const
void SetTitle (const std::string &title)
void SetComment (const std::string &comment)
bool IsReversible () const
void SetReversible (bool b=true)
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)

OBReaction Class Reference 770


Open Babel: API Documentation

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 ()

Protected Attributes
std::vector< OBGenericData * > _vdata

Detailed Description
Used to store chemical reactions (i.e., reactants -> products).

Reactants and products stored as smart pointers to molecules stored elsewhere.

For performing actual reaction transformations (i.e., deleting atoms, changing bonds, etc.) use the
OBChemTsfm class.

Constructor & Destructor Documentation

OBReaction ( ) [inline]

Member Function Documentation

int NumReactants ( ) const [inline]

int NumProducts ( ) const [inline]

void AddReactant ( const std::tr1::shared_ptr< OBMol > sp ) [inline]

Public Member Functions 771


Open Babel: API Documentation

const
void AddProduct ( std::tr1::shared_ptr< sp ) [inline]
OBMol >

void SetTransitionState ( const std::tr1::shared_ptr< OBMol > sp ) [inline]

void AddAgent ( const std::tr1::shared_ptr< OBMol > sp ) [inline]

std::tr1::shared_ptr<OBMol> GetReactant ( const unsigned i ) [inline]

std::tr1::shared_ptr<OBMol> GetProduct ( const unsigned i ) [inline]

std::tr1::shared_ptr<OBMol> GetTransitionState ( ) const [inline]

std::tr1::shared_ptr<OBMol> GetAgent ( ) const [inline]

const
std::string GetTitle ( )
[inline]

std::string GetComment ( ) const [inline]

void SetTitle ( const std::string & title ) [inline]

const
void SetComment ( std::string comment ) [inline]
&

bool IsReversible ( ) const [inline]

void SetReversible ( bool b = true ) [inline]

static const char* ClassDescription ( ) [inline, static]

Returns:
A list of descriptions of command-line options for DoTransformations()

Member Function Documentation 772


Open Babel: API Documentation

Reimplemented from OBBase.

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.

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.

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]
*

Member Function Documentation 773


Open Babel: API Documentation

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.

[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

Member Function Documentation 774


Open Babel: API Documentation

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]

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]

Member Function Documentation 775


Open Babel: API Documentation

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 Data Documentation

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 file:

• reaction.h

Member Data Documentation 776


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:58 2008 by 1.5.6.

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

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

Member Data Documentation 777


OBResidue Member List
This is the complete list of members for OBResidue, including all inherited members.

_aakey OBResidue [protected]


_atomid OBResidue [protected]
_atoms OBResidue [protected]
_chain OBResidue [protected]
_hetatm OBResidue [protected]
_idx OBResidue [protected]
_reskey OBResidue [protected]
_resname OBResidue [protected]
_resnum OBResidue [protected]
_sernum OBResidue [protected]
_vdata OBBase [protected]
AddAtom(OBAtom *atom) OBResidue
BeginAtom(std::vector< OBAtom * >::iterator &i) OBResidue
BeginAtoms() OBResidue [inline]
BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
[inline,
ClassDescription() OBBase
static]
Clear() OBResidue [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]
EndAtoms() OBResidue [inline]
EndData() OBBase [inline]
GetAllData(const unsigned int type) OBBase
GetAminoAcidProperty(int) const OBResidue
GetAtomID(OBAtom *atom) const OBResidue
GetAtomProperty(OBAtom *a, int) const OBResidue
GetAtoms(void) const OBResidue
GetBonds(bool exterior=true) const OBResidue
GetChain(void) const OBResidue
GetChainNum(void) const OBResidue
GetData(const unsigned int type) OBBase

OBResidue Member List 778


Open Babel: API Documentation

GetData(const std::string &) OBBase


GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
GetIdx(void) const OBResidue
GetName(void) const OBResidue
GetNum(void) OBResidue
GetNumAtoms() const OBResidue
GetNumString(void) OBResidue
GetResidueProperty(int) const OBResidue
GetResKey(void) const OBResidue
GetSerialNum(OBAtom *atom) const OBResidue
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
InsertAtom(OBAtom *atom) OBResidue
IsHetAtom(OBAtom *atom) const OBResidue
IsResidueType(int) const OBResidue
NextAtom(std::vector< OBAtom * >::iterator &i) OBResidue
OBResidue(void) OBResidue
OBResidue(const OBResidue &) OBResidue
operator=(const OBResidue &) OBResidue
RemoveAtom(OBAtom *atom) OBResidue
SetAtomID(OBAtom *atom, const std::string &id) OBResidue
SetChain(const char chain) OBResidue
SetChainNum(const unsigned int chainnum) OBResidue
SetData(OBGenericData *d) OBBase [inline]
SetHetAtom(OBAtom *atom, bool hetatm) OBResidue
SetIdx(const unsigned int idx) OBResidue
SetName(const std::string &resname) OBResidue
SetNum(const unsigned int resnum) OBResidue
SetNum(const std::string resnum) OBResidue
SetSerialNum(OBAtom *atom, unsigned int sernum) OBResidue
[inline,
~OBBase() OBBase
virtual]
~OBResidue(void) OBResidue [virtual]

OBResidue Member List 779


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:58 2008 by 1.5.6.

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

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

OpenBabel::OBResidue

OBResidue Member List 780


OBResidue Class Reference
Residue information. More...

#include <openbabel/residue.h>

Inheritance diagram for OBResidue:

[legend]

List of all members.

Public Member Functions


OBResidue (void)
OBResidue (const OBResidue &)
virtual ~OBResidue (void)
OBResidue & operator= (const OBResidue &)
void AddAtom (OBAtom *atom)
void InsertAtom (OBAtom *atom)
void RemoveAtom (OBAtom *atom)
bool Clear ()
void SetName (const std::string &resname)
void SetNum (const unsigned int resnum)
void SetNum (const std::string resnum)
void SetChain (const char chain)
void SetChainNum (const unsigned int chainnum)
void SetIdx (const unsigned int idx)
void SetAtomID (OBAtom *atom, const std::string &id)
void SetHetAtom (OBAtom *atom, bool hetatm)
void SetSerialNum (OBAtom *atom, unsigned int sernum)
std::string GetName (void) const
unsigned int GetNum (void)
std::string GetNumString (void)
unsigned int GetNumAtoms () const
char GetChain (void) const
unsigned int GetChainNum (void) const
unsigned int GetIdx (void) const
unsigned int GetResKey (void) const
std::vector< OBAtom * > GetAtoms (void) const
std::vector< OBBond * > GetBonds (bool exterior=true) const
std::string GetAtomID (OBAtom *atom) const
unsigned GetSerialNum (OBAtom *atom) const

OBResidue Class Reference 781


Open Babel: API Documentation
bool GetAminoAcidProperty (int) const
bool GetAtomProperty (OBAtom *a, int) const
bool GetResidueProperty (int) const
bool IsHetAtom (OBAtom *atom) const
bool IsResidueType (int) const
virtual OBBase * DoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)
Iterator methods
OBAtomIterator BeginAtoms ()
OBAtomIterator EndAtoms ()
OBAtom * BeginAtom (std::vector< OBAtom * >::iterator &i)
OBAtom * NextAtom (std::vector< OBAtom * >::iterator &i)
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 ()

Protected Attributes
unsigned int _idx
char _chain
unsigned int _aakey
unsigned int _reskey
std::string _resnum
std::string _resname
std::vector< bool > _hetatm
std::vector< std::string > _atomid
std::vector< OBAtom * > _atoms
std::vector< unsigned int > _sernum
std::vector< OBGenericData * > _vdata

Public Member Functions 782


Open Babel: API Documentation

Detailed Description
Residue information.

The residue information is drawn from PDB or MOL2 files (or similar), which track biomolecule information,
and are stored in the OBResidue class. OBResidues are stored inside the OBAtom class and OBMol classes.
The residue information for an atom can be requested in the following way:

OBAtom *atom;
OBResidue *r;
atom = mol.GetAtom(1);
r = atom->GetResidue();

The residue information for a molecule can be manipulated too:

cout << "This molecule has " << mol.NumResidues() << " residues." << endl;
OBResidue *r;
r = mol.GetResidue(1);

Constructor & Destructor Documentation

OBResidue ( void )
Constructor.

OBResidue ( const OBResidue & src )


Copy constructor.

~OBResidue ( void ) [virtual]


Destructor.

Member Function Documentation

OBResidue & operator= ( const OBResidue & src )

void AddAtom ( OBAtom * atom )


Add atom to this residue. Updates the atom via OBAtom::SetResidue().

Referenced by OBMol::AddHydrogens(), OBResidue::InsertAtom(), and OBMol::operator=().

void InsertAtom ( OBAtom * atom )


Add atom to this residue. Updates the atom via OBAtom::SetResidue().

Protected Attributes 783


Open Babel: API Documentation

void RemoveAtom ( OBAtom * atom )


Remove atom from this residue and update the atom.

Referenced by OBAtom::~OBAtom().

bool Clear ( void ) [virtual]


Clear any and all data associated with this residue. Updates all atoms included in the residue, as well as
calling OBBase::Clear() for any generic data.

Returns:
Whether the call was successful.

Reimplemented from OBBase.

const
void SetName ( std::string resname )
&
Set the name of this residue (e.g., "ALA"). Use 3-char PDB standard names.
http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_79.html MODRES records for modified residues:
http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_36.html.

Referenced by OBMol::operator=().

void SetNum ( const unsigned int resnum )


Set the residue number (in the sequence).

Referenced by OBMol::operator=().

void SetNum ( const std::string resnum )

const
void SetChain ( chain )
char
Set the chain ID for this residue.

Referenced by OBMol::operator=().

const
void SetChainNum ( unsigned chainnum )
int
Set the chain number for this residue.

Referenced by OBMol::operator=().

Member Function Documentation 784


Open Babel: API Documentation

const
void SetIdx ( unsigned idx )
int
Set the internal index of this residue in the parent OBMol. Intended mostly for internal use

Referenced by OBMol::AddResidue(), and OBMol::NewResidue().

void SetAtomID ( OBAtom * atom,


const std::string & id
)
Set the character code ID for an ATOM record for the supplied atom This does nothing if the supplied atom is
not found in the residue

Referenced by OBMol::AddHydrogens(), and OBMol::operator=().

void SetHetAtom ( OBAtom * atom,


bool hetatm
)

Referenced by OBMol::operator=().

OBAtom
void SetSerialNum ( atom,
*
unsigned
sernum
int
)
Set the atomic serial number for a given atom (see OBSerialNums).

Referenced by OBMol::operator=().

string GetName ( void ) const

Returns:
The residue name

Referenced by OBResidueData::AssignBonds(), and OBMol::operator=().

unsigned int GetNum ( void )

Returns:
The residue number (in the sequence)

Member Function Documentation 785


Open Babel: API Documentation

std::string GetNumString ( void )

Referenced by OBResidueData::AssignBonds(), and OBMol::operator=().

unsigned int GetNumAtoms ( void ) const

Returns:
The number of atoms in this residue

char GetChain ( void ) const

Returns:
The ID of the chain which includes this residue

Referenced by OBMol::operator=().

unsigned int GetChainNum ( void ) const

Returns:
The number of the chain which includes this residue

Referenced by OBMol::operator=().

unsigned int GetIdx ( void ) const

Returns:
The internal index of this residue in the parent OBMol

Referenced by OBMol::DeleteResidue().

unsigned int GetResKey ( void ) const

Returns:
The residue key (i.e., an entry in the OBResidueIndex namespace)

vector< OBAtom * > GetAtoms ( void ) const

Returns:
a vector of all atoms in this residue

vector< OBBond * > GetBonds ( bool exterior = true ) const

Member Function Documentation 786


Open Babel: API Documentation

Returns:
all bonds in this residue. exterior includes bonds to atoms outside this residue (default is true)

string GetAtomID ( OBAtom * atom ) const

Returns:
the atom ID (character code) for the supplied atom or "" if the atom is not found in this residue

Referenced by OBResidueData::AssignBonds(), OBResidue::GetAtomProperty(), and OBMol::operator=().

unsigned int GetSerialNum ( OBAtom * atom ) const

Returns:
the serial number of the supplied atom (uses OBSerialNums)

Referenced by OBMol::operator=().

bool GetAminoAcidProperty ( int property ) const

Returns:
Whether this residue has the supplied amino acid property defined from the OBAminoAcidProperty
namespace

bool GetAtomProperty ( OBAtom * a,


int property
) const

Returns:
Whether atom a has the supplied residue atom property defined from the OBResidueAtomProperty
namespace

bool GetResidueProperty ( int property ) const

Returns:
Whether this residue has the supplied property defined from the OBResidueProperty namespace

Referenced by OBResidue::GetAtomProperty().

bool IsHetAtom ( OBAtom * atom ) const

Returns:
If the given atom is a HETATM record

Member Function Documentation 787


Open Babel: API Documentation

Referenced by OBResidue::GetAtomProperty(), and OBMol::operator=().

bool IsResidueType ( int restype ) const

Returns:
If this residue matches the supplied restype Set by SetResidueKeys()

OBAtomIterator BeginAtoms ( ) [inline]

Returns:
An iterator to the beginning of the atom list in this residue

OBAtomIterator EndAtoms ( ) [inline]

Returns:
An iterator to the end of the atom list in this residue

OBAtom * BeginAtom ( std::vector< OBAtom * >::iterator & i )


Set the iterator i to the beginning of the atom list in this residue

Returns:
The first atom (or NULL if none exist)

Referenced by OBMol::operator=().

std::vector<
OBAtom * NextAtom ( OBAtom * i )
>::iterator &
Increment the iterator i

Returns:
The next atom (or NULL if none exist)

Referenced by OBResidueAtomIter::operator++(), and OBMol::operator=().

[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()

Member Function Documentation 788


Open Babel: API Documentation

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

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.

Member Function Documentation 789


Open Babel: API Documentation

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:
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 s ) [inherited]


std::string

Member Function Documentation 790


Open Babel: API Documentation

&

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

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(),

Member Function Documentation 791


Open Babel: API Documentation

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]


Residue index (i.e., internal index in an OBMol).

Referenced by OBResidue::Clear(), OBResidue::GetIdx(), OBResidue::OBResidue(), and


OBResidue::SetIdx().

char _chain [protected]


Chain ID.

Referenced by OBResidue::Clear(), OBResidue::GetChain(), OBResidue::GetChainNum(),


OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::SetChain(), and
OBResidue::SetChainNum().

unsigned int _aakey [protected]


Amino Acid key ID -- see SetResidueKeys().

Referenced by OBResidue::Clear(), OBResidue::GetAminoAcidProperty(), OBResidue::OBResidue(),


OBResidue::operator=(), and OBResidue::SetName().

unsigned int _reskey [protected]


Residue key ID -- see SetResidueKeys().

Referenced by OBResidue::Clear(), OBResidue::GetResidueProperty(), OBResidue::GetResKey(),


OBResidue::IsResidueType(), OBResidue::OBResidue(), OBResidue::operator=(), and
OBResidue::SetName().

std::string _resnum [protected]


Residue number (i.e., in file) 23, 1B, etc.

Member Data Documentation 792


Open Babel: API Documentation

Referenced by OBResidue::Clear(), OBResidue::GetNum(), OBResidue::GetNumString(),


OBResidue::OBResidue(), OBResidue::operator=(), and OBResidue::SetNum().

std::string _resname [protected]


Residue text name.

Referenced by OBResidue::Clear(), OBResidue::GetName(), OBResidue::OBResidue(),


OBResidue::operator=(), and OBResidue::SetName().

std::vector<bool> _hetatm [protected]


Is a given atom a HETAM.

Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::IsHetAtom(),


OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and
OBResidue::SetHetAtom().

std::vector<std::string> _atomid [protected]


Residue atom text IDs.

Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::GetAtomID(),


OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and
OBResidue::SetAtomID().

std::vector<OBAtom*> _atoms [protected]


List of OBAtom in this residue.

Referenced by OBResidue::AddAtom(), OBResidue::BeginAtom(), OBResidue::Clear(),


OBResidue::GetAtomID(), OBResidue::GetAtoms(), OBResidue::GetBonds(), OBResidue::GetNumAtoms(),
OBResidue::GetSerialNum(), OBResidue::IsHetAtom(), OBResidue::NextAtom(),
OBResidue::RemoveAtom(), OBResidue::SetAtomID(), OBResidue::SetHetAtom(),
OBResidue::SetSerialNum(), and OBResidue::~OBResidue().

std::vector<unsigned int> _sernum [protected]


List of serial numbers.

Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::GetSerialNum(),


OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and
OBResidue::SetSerialNum().

std::vector<OBGenericData*> _vdata [protected, inherited]


Custom data.

Referenced by OBBase::Clear(), OBBase::CloneData(), OBBase::DeleteData(), OBAtom::Duplicate(),

Member Data Documentation 793


Open Babel: API Documentation

OBBase::GetAllData(), OBBase::GetData(), OBBase::HasData(), OBBond::OBBond(), OBMol::OBMol(),


and OBResidue::OBResidue().

The documentation for this class was generated from the following files:

• residue.h
• residue.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 794


OBResidueAtomIter Member List
This is the complete list of members for OBResidueAtomIter, including all inherited members.

OBResidueAtomIter() OBResidueAtomIter [inline]


OBResidueAtomIter(OBResidue *res) OBResidueAtomIter
OBResidueAtomIter(OBResidue &res) OBResidueAtomIter
OBResidueAtomIter(const OBResidueAtomIter &ri) OBResidueAtomIter
operator bool() const OBResidueAtomIter [inline]
operator*() const OBResidueAtomIter [inline]
operator++() OBResidueAtomIter
operator++(int) OBResidueAtomIter
operator->() const OBResidueAtomIter [inline]
operator=(const OBResidueAtomIter &ri) OBResidueAtomIter
~OBResidueAtomIter() OBResidueAtomIter [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::OBResidueAtomIter

OBResidueAtomIter Member List 795


OBResidueAtomIter Class Reference
Iterate over all atoms in an OBResidue. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBResidueAtomIter ()
OBResidueAtomIter (OBResidue *res)
OBResidueAtomIter (OBResidue &res)
OBResidueAtomIter (const OBResidueAtomIter &ri)
~OBResidueAtomIter ()
OBResidueAtomIter & operator= (const OBResidueAtomIter &ri)
operator bool () const
OBResidueAtomIter & operator++ ()
OBResidueAtomIter operator++ (int)
OBAtom * operator-> () const
OBAtom & operator* () const

Detailed Description
Iterate over all atoms in an OBResidue.

To facilitate iteration through all atoms in a residue, without resorting to atom 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_ATOMS_OF_RESIDUE(a,r) for( OBResidueAtomIter a(r); a; ++a )

Here is an example:

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

OBMol mol;
double residueMass = 0.0;
FOR_RESIDUES_OF_MOL(r, mol)
{
// The variable r behaves like OBResidue* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*r

if (r->GetName() == resname && r->GetNum() == rnum)


{
FOR_ATOMS_OF_RESIDUE(a, &*r)
{

OBResidueAtomIter Class Reference 796


Open Babel: API Documentation
residueMass += a->GetMass();
}
}
}

Constructor & Destructor Documentation

OBResidueAtomIter ( ) [inline]

OBResidueAtomIter ( OBResidue * res )

OBResidueAtomIter ( OBResidue & res )

OBResidueAtomIter ( const OBResidueAtomIter & ri )

~OBResidueAtomIter ( ) [inline]

Member Function Documentation

const
OBResidueAtomIter & operator= ( OBResidueAtomIter ri )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more atoms in this residue)

OBResidueAtomIter & operator++ ( )


Preincrement -- advance to the next atom (if any) and return.

Referenced by OBResidueAtomIter::operator++().

OBResidueAtomIter operator++ ( int )


Postincrement -- return the current state and advance to the next atom (if any).

const
OBAtom* operator-> ( )
[inline]

Detailed Description 797


Open Babel: API Documentation

Returns:
a pointer to the current atom

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 798


OBResidueData Member List
This is the complete list of members for OBResidueData, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignBonds(OBMol &, OBBitVec &) OBResidueData
GetSize() OBResidueData [inline, virtual]
Init() OBGlobalDataBase
LookupBO(const std::string &) OBResidueData
LookupBO(const std::string &, const std::string &) OBResidueData
LookupType(const std::string &, std::string &, int &) OBResidueData
OBGlobalDataBase() OBGlobalDataBase [inline]
OBResidueData() OBResidueData
ParseLine(const char *) OBResidueData [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
SetResName(const std::string &) OBResidueData
~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:56 2008 by 1.5.6.

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

OBResidueData Member List 799


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBResidueData

OBResidueData Member List 800


OBResidueData Class Reference
Table of common biomolecule residues (for PDB or other files). More...

#include <openbabel/data.h>

Inheritance diagram for OBResidueData:

[legend]

List of all members.

Public Member Functions


OBResidueData ()
void ParseLine (const char *)
unsigned int GetSize ()
bool SetResName (const std::string &)
int LookupBO (const std::string &)
int LookupBO (const std::string &, const std::string &)
bool LookupType (const std::string &, std::string &, int &)
bool AssignBonds (OBMol &, OBBitVec &)
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
Table of common biomolecule residues (for PDB or other files).

Can assign atom types and bond orders for arbitrary residues

OBResidueData Class Reference 801


Open Babel: API Documentation

Constructor & Destructor Documentation

OBResidueData ( )

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 residues in the table

Reimplemented from OBGlobalDataBase.

const
bool SetResName ( std::string s )
&
Sets the table to access the residue information for a specified residue name

Returns:
whether this residue name is in the table

Referenced by OBResidueData::AssignBonds().

const
int LookupBO ( std::string s )
&

Returns:
the bond order for the bond specified in the current residue

Deprecated:
Easier to use the two-argument form

Referenced by OBResidueData::AssignBonds().

int LookupBO ( s1,

Detailed Description 802


Open Babel: API Documentation

const
std::string
&
const
std::string s2
&
)

Returns:
the bond order for the bond specified between the two specified atom labels

const
bool LookupType ( std::string atmid,
&
std::string
type,
&
int & hyb
)
Look up the atom type and hybridization for the atom label specified in the first argument for the current
residue

Returns:
whether the atom label specified is found in the current residue

Referenced by OBResidueData::AssignBonds().

bool AssignBonds ( OBMol & mol,


OBBitVec & bv
)
Assign bond orders, atom types and residues for the supplied OBMol based on the residue information
assigned to atoms

Deprecated:
second OBBitVec argument is ignored

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(),

Member Function Documentation 803


Open Babel: API Documentation

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(),
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(),

Member Data Documentation 804


Open Babel: API Documentation

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(),
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:

• data.h
• data.cpp

Member Data Documentation 805


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 806


OBResidueIter Member List
This is the complete list of members for OBResidueIter, including all inherited members.

OBResidueIter() OBResidueIter [inline]


OBResidueIter(OBMol *mol) OBResidueIter
OBResidueIter(OBMol &mol) OBResidueIter
OBResidueIter(const OBResidueIter &ri) OBResidueIter
operator bool() const OBResidueIter [inline]
operator*() const OBResidueIter [inline]
operator++() OBResidueIter
operator++(int) OBResidueIter
operator->() const OBResidueIter [inline]
operator=(const OBResidueIter &ri) OBResidueIter
~OBResidueIter() OBResidueIter [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::OBResidueIter

OBResidueIter Member List 807


OBResidueIter Class Reference
Iterate over all residues in an OBMol. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBResidueIter ()
OBResidueIter (OBMol *mol)
OBResidueIter (OBMol &mol)
OBResidueIter (const OBResidueIter &ri)
~OBResidueIter ()
OBResidueIter & operator= (const OBResidueIter &ri)
operator bool () const
OBResidueIter & operator++ ()
OBResidueIter operator++ (int)
OBResidue * operator-> () const
OBResidue & operator* () const

Detailed Description
Iterate over all residues in an OBMol.

To facilitate iteration through all residues in a molecule, without resorting to residue 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_RESIDUES_OF_MOL(r,m) for( OBResidueIter r(m); r; ++r )

Here is an example:

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

OBMol mol;
FOR_RESIDUES_OF_MOL(r, mol)
{
// The variable r behaves like OBResidue* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*r

if (r->GetName() == resname && r->GetNum() == rnum)


{
// got a match, let's go to work
...
}

OBResidueIter Class Reference 808


Open Babel: API Documentation
}

Constructor & Destructor Documentation

OBResidueIter ( ) [inline]

OBResidueIter ( OBMol * mol )

OBResidueIter ( OBMol & mol )

OBResidueIter ( const OBResidueIter & ri )

~OBResidueIter ( ) [inline]

Member Function Documentation

const
OBResidueIter & operator= ( OBResidueIter ri )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more residues)

OBResidueIter & operator++ ( )


Preincrement -- advance to the next residue and return.

Referenced by OBResidueIter::operator++().

OBResidueIter operator++ ( int )


Postincrement -- return the current state and advance to the next residue.

OBResidue* operator-> ( ) const [inline]

Returns:
a pointer to the current residue

Detailed Description 809


Open Babel: API Documentation

OBResidue& operator* ( ) const [inline]

Returns:
a reference to the current residue

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 810


OBRing Member List
This is the complete list of members for OBRing, including all inherited members.

_path OBRing
_pathset OBRing
findCenterAndNormal(vector3 &center, vector3 &norm1, vector3 &norm2) OBRing
GetParent() OBRing [inline]
GetRootAtom() OBRing
GetType() OBRing
IsAromatic() OBRing
IsInRing(int i) OBRing [inline]
IsMember(OBAtom *a) OBRing
IsMember(OBBond *b) OBRing
OBRing() OBRing [inline]
OBRing(std::vector< int > &path, int size) OBRing
OBRing(std::vector< int > &path, OBBitVec set) OBRing [inline]
OBRing(const OBRing &src) OBRing
operator=(const OBRing &src) OBRing
PathSize() const OBRing [inline]
SetParent(OBMol *m) OBRing [inline]
SetType(char *type) OBRing
SetType(std::string &type) OBRing
Size() const OBRing [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

OBRing Member List 811


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBRing

OBRing Member List 812


OBRing Class Reference
Stores information on rings in a molecule from SSSR perception. More...

#include <openbabel/ring.h>

List of all members.

Public Member Functions


int Size () const
int PathSize () const
bool IsAromatic ()
void SetType (char *type)
void SetType (std::string &type)
char * GetType ()
unsigned int GetRootAtom ()
bool IsMember (OBAtom *a)
bool IsMember (OBBond *b)
bool IsInRing (int i)
void SetParent (OBMol *m)
OBMol * GetParent ()
bool findCenterAndNormal (vector3 &center, vector3 &norm1, vector3 &norm2)
Constructors
OBRing ()
OBRing (std::vector< int > &path, int size)
OBRing (std::vector< int > &path, OBBitVec set)
OBRing (const OBRing &src)
OBRing & operator= (const OBRing &src)

Public Attributes
std::vector< int > _path
OBBitVec _pathset

Detailed Description
Stores information on rings in a molecule from SSSR perception.

Ring information beyond atom and bond membership is usually not necessary, but more information can be
had about the rings in a molecule. The OBRing class is used to store the information from a Smallest Set of
Smallest Rings (SSSR) perception of a molecule. The OBMol member function OBMol::GetSSSR() stores
the information it perceives in a vector<OBRing*> inside the molecule. Perception is only done once for a
molecule unless the connection table is modified. The following code demonstrates how to extract the SSSR
information:

OBMol mol;

OBRing Class Reference 813


Open Babel: API Documentation

vector<OBRing*> vr;
vr = mol.GetSSSR();

OBRings store the atom numbers of the atoms in each of the smallest set of smallest rings in both a
vector<int> and an OBBitVec. An example of how to print out the atom numbers present in all SSSR rings is
show below:

vector<OBRing*>::iterator i;
vector<int>::iterator j;
vector<OBRing*> *rlist = (vector<OBRing*>*)mol.GetData("RingList");
for (i = rlist->begin();i != rlist->end();++i)
{
for(j = (*i)->_path.begin(); j != (*i)->_path.end(); ++j)
cout << *j << ' ';
cout << endl;
}

will produce something like the following output for benzene:

1 2 3 4 5 6

Ring information is automatically deleted from an OBMol when it goes out of scope or the OBMol::Clear()
member function is called.

Implements blue-obelisk:findSmallestSetOfSmallestRings.

Constructor & Destructor Documentation

OBRing ( ) [inline]

OBRing ( std::vector< int > & path,


int size
)
Initialize a ring from a set of atom indexes path and with size.

OBRing ( std::vector< int > & path,


OBBitVec set
) [inline]

OBRing ( const OBRing & src )


OBRing copy constructor.

Parameters:
src reference to original OBRing object (rhs)

Detailed Description 814


Open Babel: API Documentation

Member Function Documentation

const
OBRing & operator= ( OBRing src )
&
OBRing assignment operator.

Parameters:
src reference to original OBRing object (rhs)

Returns:
reference to modified OBRing object (lhs)

int Size ( ) const [inline]

Returns:
the size of this ring (i.e., how many atoms in the cycle)

Referenced by OpenBabel::CompareRingSize(), and OBRing::GetRootAtom().

int PathSize ( ) const [inline]

Returns:
the size of this ring (i.e., how many atoms in the cycle)

Deprecated:
Use Size() instead

bool IsAromatic ( )

Returns:
whether this ring is aromatic If all atoms in this ring are aromatic, the ring will be considered aromatic

Todo:
This method uses implicit bonding -- bond info is not stored in OBRing

void SetType ( char * type )


Set the ring type (see OBRingTyper for more).

std::string
void SetType ( type )
&
Set the ring type (see OBRingTyper for more).

Member Function Documentation 815


Open Babel: API Documentation

char * GetType ( void )

Returns:
the ring type

unsigned int GetRootAtom ( )

Returns:
the index for the root atom. O for furan, S for thiazole, N for pyrrole. For 6 membered aromatic rings,
the first non carbon atom is used for root. For 5 members rings the O, S or N (BOSum=3, valence=3)
will be used for root

bool IsMember ( OBAtom * a )

Returns:
Whether atom a is a member of this ring

bool IsMember ( OBBond * b )

Returns:
Whether both atoms in bond b are in this ring

Todo:
This method uses implicit bonding -- bond info is not stored in OBRing

bool IsInRing ( int i ) [inline]

Returns:
Whether i as an atom index is in this ring

Referenced by OBAromaticTyper::SelectRootAtoms().

void SetParent ( OBMol * m ) [inline]


Set the parent of this ring to m.

Referenced by OBMol::FindSSSR().

OBMol* GetParent ( ) [inline]

Returns:
the parent of this ring, or NULL if none has been defined

Referenced by OBRing::GetRootAtom(), and OBRing::GetType().

Member Function Documentation 816


Open Babel: API Documentation

bool findCenterAndNormal ( vector3 & center,


vector3 & norm1,
vector3 & norm2
)
Set the supplied vectors to the center of this ring, along with the normal (in both directions).

Parameters:
center The center of the ring
norm1 The normal of the best-fit plane for this ring
norm2 -1 * norm1 (i.e., the opposite direction of norm1)

Returns:
True (success)

Member Data Documentation

std::vector<int> _path
the path of this ring (i.e., the atom indexes)

Referenced by OBRing::findCenterAndNormal(), OBRing::GetRootAtom(), OBRing::IsAromatic(),


OBRing::OBRing(), OBRing::operator=(), and OBAromaticTyper::SelectRootAtoms().

OBBitVec _pathset
the path of this ring as a redundant bit vector

Referenced by OpenBabel::FindRingAtoms(), OBRing::IsMember(), OBRing::OBRing(), and


OBRing::operator=().

The documentation for this class was generated from the following files:

• ring.h
• ring.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 817


Open Babel: API Documentation

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 818


OBRingData Member List
This is the complete list of members for OBRingData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vr OBRingData [protected]
BeginRing(std::vector< OBRing * >::iterator &i) OBRingData
BeginRings() OBRingData [inline]
[inline,
Clone(OBBase *) const OBRingData
virtual]
EndRings() OBRingData [inline]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() OBRingData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
NextRing(std::vector< OBRing * >::iterator &i) OBRingData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBRingData() OBRingData
OBRingData(const OBRingData &) OBRingData
operator=(const OBRingData &) OBRingData
PushBack(OBRing *r) OBRingData [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(std::vector< OBRing * > &vr) OBRingData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]
~OBRingData() OBRingData

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

OBRingData Member List 819


Open Babel: API Documentation

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::OBRingData

OBRingData Member List 820


OBRingData Class Reference
Used to store the SSSR set (filled in by OBMol::GetSSSR()). More...

#include <openbabel/generic.h>

Inheritance diagram for OBRingData:

[legend]

List of all members.

Public Member Functions


OBRingData ()
OBRingData (const OBRingData &)
virtual OBGenericData * Clone (OBBase *) const
~OBRingData ()
OBRingData & operator= (const OBRingData &)
void SetData (std::vector< OBRing * > &vr)
void PushBack (OBRing *r)
std::vector< OBRing * > & GetData ()
std::vector< OBRing * >::iterator BeginRings ()
std::vector< OBRing * >::iterator EndRings ()
OBRing * BeginRing (std::vector< OBRing * >::iterator &i)
OBRing * NextRing (std::vector< OBRing * >::iterator &i)
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< OBRing * > _vr
std::string _attr
unsigned int _type
DataOrigin _source

OBRingData Class Reference 821


Open Babel: API Documentation

Detailed Description
Used to store the SSSR set (filled in by OBMol::GetSSSR()).

Constructor & Destructor Documentation

OBRingData ( )

OBRingData ( const OBRingData & src )


OBRingData copy constructor.

Parameters:
src reference to original OBRingData object (rhs)

~OBRingData ( )

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBRingData & operator= ( const OBRingData & src )


OBRingData assignment operator.

Parameters:
src reference to original OBRingData object (rhs)

Returns:
reference to changed OBRingData object (lhs)

void SetData ( std::vector< OBRing * > & vr ) [inline]

Referenced by OBMol::FindSSSR().

void PushBack ( OBRing * r ) [inline]

std::vector<OBRing*>& GetData ( ) [inline]

Detailed Description 822


Open Babel: API Documentation

Referenced by OBMol::GetSSSR().

std::vector<OBRing*>::iterator BeginRings ( ) [inline]

std::vector<OBRing*>::iterator EndRings ( ) [inline]

OBRing * BeginRing ( std::vector< OBRing * >::iterator & i )

Referenced by OBMolRingIter::OBMolRingIter().

OBRing * NextRing ( std::vector< OBRing * >::iterator & i )

Referenced by OBMolRingIter::operator++().

[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:

Member Function Documentation 823


Open Babel: API Documentation

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<OBRing*> _vr [protected]

Referenced by OBRingData::BeginRing(), OBRingData::NextRing(), OBRingData::OBRingData(),


OBRingData::operator=(), and OBRingData::~OBRingData().

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 824


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 825


OBRingSearch Member List
This is the complete list of members for OBRingSearch, including all inherited members.

AddRingFromClosure(OBMol &, OBBond *) OBRingSearch


BeginRings() OBRingSearch [inline]
EndRings() OBRingSearch [inline]
OBRingSearch() OBRingSearch [inline]
RemoveRedundant(int) OBRingSearch
SaveUniqueRing(std::deque< int > &, std::deque< int > &) OBRingSearch
SortRings() OBRingSearch [inline]
WriteRings() OBRingSearch
~OBRingSearch() OBRingSearch

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::OBRingSearch

OBRingSearch Member List 826


OBRingSearch Class Reference
Internal class to facilitate OBMol::FindSSSR(). More...

#include <openbabel/ring.h>

List of all members.

Public Member Functions


OBRingSearch ()
~OBRingSearch ()
void SortRings ()
void RemoveRedundant (int)
void AddRingFromClosure (OBMol &, OBBond *)
bool SaveUniqueRing (std::deque< int > &, std::deque< int > &)
void WriteRings ()
Iterator methods -- see OBMolRingIter for iteration over a molecule
std::vector< OBRing * >::iterator BeginRings ()
std::vector< OBRing * >::iterator EndRings ()

Detailed Description
Internal class to facilitate OBMol::FindSSSR().

Constructor & Destructor Documentation

OBRingSearch ( ) [inline]

~OBRingSearch ( )
Destructor -- free all rings created from this search.

Member Function Documentation

void SortRings ( ) [inline]


Sort ring sizes from smallest to largest.

Referenced by OBMol::FindSSSR().

void RemoveRedundant ( int frj )


Starting with a full ring set - reduce to SSSR set.

OBRingSearch Class Reference 827


Open Babel: API Documentation

Referenced by OBMol::FindSSSR().

void AddRingFromClosure ( OBMol & mol,


OBBond * cbond
)
Add a new ring from a "closure" bond: See OBBond::IsClosure().

Referenced by OBMol::FindSSSR().

bool SaveUniqueRing ( std::deque< int > & d1,


std::deque< int > & d2
)

Referenced by OBRingSearch::AddRingFromClosure().

void WriteRings ( )
For debugging only, write the rings to std::cout.

std::vector<OBRing*>::iterator BeginRings ( ) [inline]

Returns:
an iterator pointing to the beginning of the list of rings

Referenced by OBMol::FindSSSR().

std::vector<OBRing*>::iterator EndRings ( ) [inline]

Returns:
an iterator pointing to the end of the list of rings

Referenced by OBMol::FindSSSR().

The documentation for this class was generated from the following files:

• ring.h
• ring.cpp

Member Function Documentation 828


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:58 2008 by 1.5.6.

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

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

Member Function Documentation 829


OBRingTyper Member List
This is the complete list of members for OBRingTyper, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignTypes(OBMol &) OBRingTyper
GetSize() OBRingTyper [inline, virtual]
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
OBRingTyper() OBRingTyper
ParseLine(const char *) OBRingTyper [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]
~OBRingTyper() OBRingTyper

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

OBRingTyper Member List 830


Open Babel: API Documentation

• Class Members

OpenBabel::OBRingTyper

OBRingTyper Member List 831


OBRingTyper Class Reference
Assigns ring types. More...

#include <openbabel/typer.h>

Inheritance diagram for OBRingTyper:

[legend]

List of all members.

Public Member Functions


OBRingTyper ()
~OBRingTyper ()
void ParseLine (const char *)
unsigned int GetSize ()
void AssignTypes (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 ring types.

The OBRingTyper class is designed to read in a list of ring typing rules and apply them to molecules. The
code that performs ring typing is not usually used directly as ring typing is done automatically when the ring
type is requested of rings:

vector<OBRing*>::iterator i;

OBRingTyper Class Reference 832


Open Babel: API Documentation
vector<OBRing*> rlist = mol.GetSSSR();

for (i = rlist.begin();i != rlist.end();++i)


cout << "ring type = " << (*i)->GetType() << endl;

Constructor & Destructor Documentation

OBRingTyper ( )

~OBRingTyper ( )

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 SMARTS patterns

Reimplemented from OBGlobalDataBase.

OBMol
void AssignTypes ( mol )
&
Assign external atomic types (ringtyp.txt).

Referenced by OBRing::GetType().

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(),

Detailed Description 833


Open Babel: API Documentation

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(),
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().

Member Function Documentation 834


Open Babel: API Documentation

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(),
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.

Member Data Documentation 835


Open Babel: API Documentation

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 836


OBRotamerList Member List
This is the complete list of members for OBRotamerList, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
AddRotamer(double *) OBRotamerList
AddRotamer(int *key) OBRotamerList
AddRotamer(std::vector< int > key) OBRotamerList
AddRotamer(unsigned char *key) OBRotamerList
AddRotamers(unsigned char *arr, int nconf) OBRotamerList
BeginRotamer() OBRotamerList [inline]
Clone(OBBase *parent) const OBRotamerList [virtual]
CreateConformerList(OBMol &mol) OBRotamerList
EndRotamer() OBRotamerList [inline]
ExpandConformerList(OBMol &mol, std::vector< double * > &confs) OBRotamerList
[inline,
GetAttribute() const OBGenericData
virtual]
GetBaseCoordinateSet(unsigned int i) const OBRotamerList [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetReferenceArray(unsigned char *) const OBRotamerList
[inline,
GetValue() const OBGenericData
virtual]
NumAtoms() const OBRotamerList [inline]
NumBaseCoordinateSets() const OBRotamerList [inline]
NumRotamers() const OBRotamerList [inline]
NumRotors() const OBRotamerList [inline]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBRotamerList() OBRotamerList [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetBaseCoordinateSets(OBMol &mol) OBRotamerList [inline]
SetBaseCoordinateSets(std::vector< double * > bc, unsigned int N) OBRotamerList
SetCurrentCoordinates(OBMol &mol, std::vector< int > arr) OBRotamerList
SetOrigin(const DataOrigin s) OBGenericData [inline]
Setup(OBMol &, OBRotorList &) OBRotamerList
Setup(OBMol &mol, unsigned char *ref, int nrotors) OBRotamerList
[inline,
~OBGenericData() OBGenericData
virtual]

OBRotamerList Member List 837


Open Babel: API Documentation

~OBRotamerList() OBRotamerList

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::OBRotamerList

OBRotamerList Member List 838


OBRotamerList Class Reference
Supports a set of rotamer coordinate sets for some number of potentially rotatable bonds. More...

#include <openbabel/rotamer.h>

Inheritance diagram for OBRotamerList:

[legend]

List of all members.

Public Member Functions


OBRotamerList ()
virtual OBGenericData * Clone (OBBase *parent) const
~OBRotamerList ()
void Setup (OBMol &, OBRotorList &)
void Setup (OBMol &mol, unsigned char *ref, int nrotors)
unsigned int NumRotors () const
unsigned int NumRotamers () const
void AddRotamer (double *)
void AddRotamer (int *key)
void AddRotamer (std::vector< int > key)
void AddRotamer (unsigned char *key)
void AddRotamers (unsigned char *arr, int nconf)
void GetReferenceArray (unsigned char *) const
std::vector< double * > CreateConformerList (OBMol &mol)
void ExpandConformerList (OBMol &mol, std::vector< double * > &confs)
void SetCurrentCoordinates (OBMol &mol, std::vector< int > arr)
void SetBaseCoordinateSets (OBMol &mol)
void SetBaseCoordinateSets (std::vector< double * > bc, unsigned int N)
unsigned int NumBaseCoordinateSets () const
double * GetBaseCoordinateSet (unsigned int i) const
unsigned int NumAtoms () 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
Iterator methods
BeginRotamer ()

OBRotamerList Class Reference 839


Open Babel: API Documentation

std::vector< unsigned char * >


::iterator
std::vector< unsigned char * >
::iterator EndRotamer ()

Protected Attributes
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Supports a set of rotamer coordinate sets for some number of potentially rotatable bonds.

A high-level class for rotamer / conformer generation, intended mainly for use with the related class
OBRotorList and the OBRotorRules database

Rotamers represent conformational isomers formed simply by rotation of dihedral angles. On the other hand,
conformers may include geometric relaxation (i.e., slight modification of bond lengths, bond angles, etc.)

The following shows an example of generating 2 conformers using different rotor states. Similar code could
be used for systematic or Monte Carlo conformer sampling when combined with energy evaluation (molecular
mechanics or otherwise).

OBRotorList rl; // used to sample all rotatable bonds via the OBRotorRules data
// If you want to "fix" any particular atoms (i.e., freeze them in space)
// then set up an OBBitVec of the fixed atoms and call
// rl.SetFixAtoms(bitvec);
rl.Setup(mol);

// How many rotatable bonds are there?


cerr << " Number of rotors: " << rl.Size() << endl;

// indexed from 1, rotorKey[0] = 0


std::vector<int> rotorKey(rl.Size() + 1, 0);

// each entry represents the configuration of a rotor


// e.g. indexes into OBRotor::GetResolution() -- the different angles
// to sample for a rotamer search
for (unsigned int i = 0; i < rl.Size() + 1; ++i)
rotorKey[i] = 0; // could be anything from 0 .. OBRotor->GetResolution().size()
// -1 is for no rotation

// The OBRotamerList can generate conformations (i.e., coordinate sets)


OBRotamerList rotamers;
rotamers.SetBaseCoordinateSets(mol);
rotamers.Setup(mol, rl);

rotamers.AddRotamer(rotorKey);
rotorKey[1] = 2; // switch one rotor
rotamers.AddRotamer(rotorKey);

rotamers.ExpandConformerList(mol, mol.GetConformers());

Public Member Functions 840


Open Babel: API Documentation

// change the molecule conformation


mol.SetConformer(0); // rotorKey 0, 0, ...
conv.Write(&mol);

mol.SetConformer(1); // rotorKey 0, 2, ...

Constructor & Destructor Documentation

OBRotamerList ( ) [inline]

~OBRotamerList ( )

Member Function Documentation

OBGenericData * Clone ( OBBase * parent ) const [virtual]

Reimplemented from OBGenericData.

void Setup ( OBMol & mol,


OBRotorList & rl
)
Set up a rotamer list based on an already created OBRotorList.

Referenced by OBRotamerList::Clone(), OBForceField::RandomRotorSearchInitialize(),


OBForceField::SystematicRotorSearchInitialize(), and OBForceField::WeightedRotorSearch().

void Setup ( OBMol & mol,


unsigned char * ref,
int nrotors
)
Set up a rotamer list based on the supplied reference atoms and the number of rotors

Parameters:
mol The molecule to evaluate
ref An array of the 4 dihedral atoms for each rotor
nrotors The number of rotors (i.e., the size of ref / 4)

unsigned int NumRotors ( ) const [inline]

Returns:
the number of rotatable bonds considered

Detailed Description 841


Open Babel: API Documentation

Referenced by OBRotamerList::Clone().

unsigned int NumRotamers ( ) const [inline]

Returns:
the number of rotamer (conformation) coordinate sets

Referenced by OBRotamerList::Clone().

void AddRotamer ( double * c )


Add a rotamer to the list based on the supplied coordinate set as a double*.

Referenced by OBForceField::RandomRotorSearchInitialize(), and


OBForceField::SystematicRotorSearchInitialize().

void AddRotamer ( int * key )


Add a rotamer to the list based on key as a configuration of the individual rotor bonds.

void AddRotamer ( std::vector< int > key )


Add a rotamer to the list based on key as a configuration of the individual rotor bonds.

void AddRotamer ( unsigned char * key )


Add a rotamer to the list based on key as a configuration of the individual rotor bonds.

void AddRotamers ( unsigned char * arr,


int nconf
)
Add nconf rotamers based on as an array of configurations much like AddRotamer().

Referenced by OBRotamerList::Clone().

void GetReferenceArray ( unsigned char * ref ) const

Returns:
A reference array (as used by AddRotamer() as a configuration of the individual rotor bonds

Referenced by OBRotamerList::Clone().

std::vector<unsigned char*>::iterator BeginRotamer ( ) [inline]

Member Function Documentation 842


Open Babel: API Documentation

std::vector<unsigned char*>::iterator EndRotamer ( ) [inline]

vector< double * > CreateConformerList ( OBMol & mol )


Create a conformer list using the internal base set of coordinates.

Returns:
The set of coordinates by rotating the bonds in each rotamer

Referenced by OBRotamerList::ExpandConformerList().

void ExpandConformerList ( OBMol & mol,


std::vector< double * > & confs
)
Create a conformer list using the internal base set of coordinates.

Returns:
The set of coordinates as a reference in confs

Referenced by OBForceField::RandomRotorSearchInitialize(), and


OBForceField::SystematicRotorSearchInitialize().

void SetCurrentCoordinates ( OBMol & mol,


std::vector<
arr
int >
)
Change the current coordinate set

Since:
version 2.2

Referenced by OBForceField::WeightedRotorSearch().

OBMol
void SetBaseCoordinateSets ( mol ) [inline]
&
Copies the mol's conformers (the coordinates, NOT the pointers) into the object as base coordinates.

Referenced by OBRotamerList::Clone(), OBForceField::RandomRotorSearchInitialize(),


OBForceField::SystematicRotorSearchInitialize(), and OBForceField::WeightedRotorSearch().

void SetBaseCoordinateSets ( std::vector< double * > bc,


unsigned int N
)
Copies the coordinates in bc, NOT the pointers, into this object.

Member Function Documentation 843


Open Babel: API Documentation

Parameters:
bc The conformer set for the molecule
N The number of atoms in the molecule

unsigned int NumBaseCoordinateSets ( ) const [inline]

Returns:
The number of "base" coordinate sets (i.e., the number of conformers in the base OBMol)

Referenced by OBRotamerList::Clone().

const
double* GetBaseCoordinateSet ( unsigned int i )
[inline]
Get a pointer to a specific base pointer (i.e., specific conformer).

Referenced by OBRotamerList::Clone().

const
unsigned int NumAtoms ( )
[inline]

Returns:
The number of atoms in the base OBMol

Referenced by OBRotamerList::Clone().

[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]

Member Function Documentation 844


Open Babel: API Documentation

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::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:

• rotamer.h
• rotamer.cpp

Member Data Documentation 845


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:58 2008 by 1.5.6.

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

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

Member Data Documentation 846


OBRotationData Member List
This is the complete list of members for OBRotationData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
ASYMMETRIC enum value OBRotationData
[inline,
Clone(OBBase *) const OBRotationData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetRotConsts() const OBRotationData [inline]
GetRotorType() const OBRotationData [inline]
GetSymmetryNumber() const OBRotationData [inline]
[inline,
GetValue() const OBGenericData
virtual]
LINEAR enum value OBRotationData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBRotationData() OBRotationData [inline]
RotConsts OBRotationData [protected]
RType enum name OBRotationData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(RType RotorType, std::vector< double > RotationalConstants,
OBRotationData [inline]
int SymmetryNumber)
SetOrigin(const DataOrigin s) OBGenericData [inline]
SYMMETRIC enum value OBRotationData
SymNum OBRotationData [protected]
type OBRotationData [protected]
UNKNOWN enum value OBRotationData
[inline,
~OBGenericData() OBGenericData
virtual]
[inline,
~OBRotationData() OBRotationData
virtual]

OBRotationData Member List 847


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::OBRotationData

OBRotationData Member List 848


OBRotationData Class Reference
Used to hold the rotational constants and symmetry numbers. More...

#include <openbabel/generic.h>

Inheritance diagram for OBRotationData:

[legend]

List of all members.

Public Types
enum RType { UNKNOWN, ASYMMETRIC, SYMMETRIC, LINEAR }

Public Member Functions


OBRotationData ()
virtual ~OBRotationData ()
virtual OBGenericData * Clone (OBBase *) const
void SetData (RType RotorType, std::vector< double > RotationalConstants,
int SymmetryNumber)
std::vector< double > GetRotConsts () const
int GetSymmetryNumber () const
RType GetRotorType () 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< double > RotConsts
int SymNum
RType type
std::string _attr
unsigned int _type
DataOrigin _source

OBRotationData Class Reference 849


Open Babel: API Documentation

Detailed Description
Used to hold the rotational constants and symmetry numbers.

Member Enumeration Documentation

enum RType

Enumerator:
UNKNOWN
ASYMMETRIC
SYMMETRIC
LINEAR

Constructor & Destructor Documentation

OBRotationData ( ) [inline]

[inline,
virtual ~OBRotationData ( )
virtual]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetData ( RType RotorType,


std::vector< double > RotationalConstants,
int SymmetryNumber
) [inline]

std::vector<double> GetRotConsts ( ) const [inline]

Returns:
Rotational constants in GHz

int GetSymmetryNumber ( ) const [inline]

Detailed Description 850


Open Babel: API Documentation

const
RType GetRotorType ( )
[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().

[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 Function Documentation 851


Open Babel: API Documentation

Member Data Documentation

std::vector<double> RotConsts [protected]


Rotational constants in GHz.

int SymNum [protected]


Rotational Symmetry Number.

RType type [protected]


linear, symmetric or asymmetric top

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:

• generic.h

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

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

Member Data Documentation 852


Open Babel: API Documentation

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 853


OBRotor Member List
This is the complete list of members for OBRotor, including all inherited members.

BeginTorIncrement() OBRotor [inline]


CalcBondLength(double *) OBRotor
CalcTorsion(double *) OBRotor
EndTorIncrement() OBRotor [inline]
GetBond() OBRotor [inline]
GetDelta() OBRotor [inline]
GetDihedralAtoms(int ref[4]) OBRotor [inline]
GetDihedralAtoms() OBRotor [inline]
GetEvalAtoms() OBRotor [inline]
GetFixedAtoms() OBRotor [inline]
GetIdx() const OBRotor [inline]
GetResolution() OBRotor [inline]
GetRotAtoms() OBRotor [inline]
OBRotor() OBRotor
Precalc(std::vector< double * > &) OBRotor
Precompute(double *) OBRotor
RemoveSymTorsionValues(int) OBRotor
Set(double *, int) OBRotor
Set(double *c, int ridx, int cidx) OBRotor [inline]
Set(double *, double, double, double, double) OBRotor
SetBond(OBBond *bond) OBRotor [inline]
SetDelta(double d) OBRotor [inline]
SetDihedralAtoms(std::vector< int > &vi) OBRotor [inline]
SetDihedralAtoms(int ref[4]) OBRotor
SetEvalAtoms(OBBitVec &bv) OBRotor [inline]
SetFixedAtoms(OBBitVec &bv) OBRotor [inline]
SetIdx(int idx) OBRotor [inline]
SetNumCoords(int nc) OBRotor [inline]
SetRotAtoms(std::vector< int > &) OBRotor
SetRotor(double *, int, int prev=-1) OBRotor
SetToAngle(double *c, double setang) OBRotor [inline]
SetTorsionValues(std::vector< double > &tmp) OBRotor [inline]
Size() OBRotor [inline]
~OBRotor() OBRotor [inline]

OBRotor Member List 854


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:58 2008 by 1.5.6.

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

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

OpenBabel::OBRotor

OBRotor Member List 855


OBRotor Class Reference
A single rotatable OBBond as part of rotamer searching. More...

#include <openbabel/rotor.h>

List of all members.

Public Member Functions


OBRotor ()
~OBRotor ()
int Size ()
int GetIdx () const
void SetNumCoords (int nc)
void SetBond (OBBond *bond)
void SetEvalAtoms (OBBitVec &bv)
void SetDihedralAtoms (std::vector< int > &vi)
void SetDelta (double d)
void SetDihedralAtoms (int ref[4])
void SetRotAtoms (std::vector< int > &)
void SetToAngle (double *c, double setang)
void SetRotor (double *, int, int prev=-1)
void Set (double *, int)
void Precompute (double *)
void Set (double *c, int ridx, int cidx)
void Set (double *, double, double, double, double)
void Precalc (std::vector< double * > &)
void SetIdx (int idx)
void SetFixedAtoms (OBBitVec &bv)
void SetTorsionValues (std::vector< double > &tmp)
void RemoveSymTorsionValues (int)
void GetDihedralAtoms (int ref[4])
void * GetRotAtoms ()
double CalcTorsion (double *)
double CalcBondLength (double *)
double GetDelta ()
OBBond * GetBond ()
std::vector< int > & GetDihedralAtoms ()
std::vector< double > & GetResolution ()
std::vector< double >::iterator BeginTorIncrement ()
std::vector< double >::iterator EndTorIncrement ()
OBBitVec & GetEvalAtoms ()
OBBitVec & GetFixedAtoms ()

OBRotor Class Reference 856


Open Babel: API Documentation

Detailed Description
A single rotatable OBBond as part of rotamer searching.

Constructor & Destructor Documentation

OBRotor ( )

~OBRotor ( ) [inline]

Member Function Documentation

int Size ( ) [inline]

Referenced by OBRotorList::Setup().

int GetIdx ( void ) const [inline]

void SetNumCoords ( int nc ) [inline]

void SetBond ( OBBond * bond ) [inline]

OBBitVec
void SetEvalAtoms ( bv ) [inline]
&

Referenced by OBRotorList::SetEvalAtoms().

std::vector<
void SetDihedralAtoms ( vi ) [inline]
int > &

Referenced by OBRotorList::AssignTorVals(), OBRotorList::SetRotAtoms(), and


OBRotorList::SetRotAtomsByFix().

void SetDelta ( double d ) [inline]

Referenced by OBRotorList::AssignTorVals().

Detailed Description 857


Open Babel: API Documentation

void SetDihedralAtoms ( int ref[4] )

void SetRotAtoms ( std::vector< int > & vi )

Referenced by OBRotorList::AssignTorVals(), OBRotorList::SetRotAtoms(), and


OBRotorList::SetRotAtomsByFix().

void SetToAngle ( double * c,


double setang
) [inline]

Referenced by OBRotorList::RemoveSymVals().

void SetRotor ( double * c,


int idx,
int prev = -1
)

void Set ( double * c,


int idx
)

Referenced by OBRotor::SetRotor().

void Precompute ( double * c )

void Set ( double * c,


int ridx,
int cidx
) [inline]

void Set ( double * c,


double sn,
double cs,
double t,
double invmag
)

Member Function Documentation 858


Open Babel: API Documentation

void Precalc ( std::vector< double * > & cv )

void SetIdx ( int idx ) [inline]

OBBitVec
void SetFixedAtoms ( bv ) [inline]
&

std::vector<
void SetTorsionValues ( tmp ) [inline]
double > &

Referenced by OBRotorList::AssignTorVals().

void RemoveSymTorsionValues ( int fold )

Referenced by OBRotorList::RemoveSymVals().

void GetDihedralAtoms ( int ref[4] ) [inline]

Referenced by OBRotorList::RemoveSymVals(), OBRotorList::SetRotAtoms(),


OBRotorList::SetRotAtomsByFix(), OBRotorList::Setup(), and OBRotamerList::Setup().

void* GetRotAtoms ( ) [inline]

double CalcTorsion ( double * c )

Referenced by OBRotor::Precalc(), OBRotor::Precompute(), and OBRotor::SetRotor().

double CalcBondLength ( double * c )

Referenced by OBRotor::Precalc().

double GetDelta ( ) [inline]

OBBond* GetBond ( ) [inline]

Referenced by OBRotorList::AssignTorVals(), OBRotorList::RemoveSymVals(), and


OBRotorList::SetEvalAtoms().

Member Function Documentation 859


Open Babel: API Documentation

std::vector<int>& GetDihedralAtoms ( ) [inline]

std::vector<double>& GetResolution ( ) [inline]

Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotamerList::Setup(),


OBForceField::SystematicRotorSearchInitialize(), and OBForceField::WeightedRotorSearch().

std::vector<double>::iterator BeginTorIncrement ( ) [inline]

std::vector<double>::iterator EndTorIncrement ( ) [inline]

OBBitVec& GetEvalAtoms ( ) [inline]

OBBitVec& GetFixedAtoms ( ) [inline]

The documentation for this class was generated from the following files:

• rotor.h
• rotor.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

Member Function Documentation 860


Open Babel: API Documentation

• Class Hierarchy
• Class Members

Member Function Documentation 861


OBRotorKeys Member List
This is the complete list of members for OBRotorKeys, including all inherited members.

AddRotor(unsigned int size) OBRotorKeys [inline]


Clear() OBRotorKeys [inline]
GetKey() OBRotorKeys [inline]
Next() OBRotorKeys [inline]
NumKeys() OBRotorKeys [inline]
OBRotorKeys() OBRotorKeys [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::OBRotorKeys

OBRotorKeys Member List 862


OBRotorKeys Class Reference
A class to generate all possible rotorKeys. More...

#include <rotor.h>

List of all members.

Public Member Functions


OBRotorKeys ()
void Clear ()
unsigned int NumKeys ()
void AddRotor (unsigned int size)
bool Next ()
std::vector< int > GetKey ()

Detailed Description
A class to generate all possible rotorKeys.

Constructor & Destructor Documentation

OBRotorKeys ( ) [inline]
Constructor.

Member Function Documentation

void Clear ( void ) [inline]


Clear all rotors.

unsigned int NumKeys ( ) [inline]


Number of rotor keys (= number of possible conformers).

unsigned
void AddRotor ( size ) [inline]
int
Add a rotor

Parameters:
size the rotor resolution

OBRotorKeys Class Reference 863


Open Babel: API Documentation

Referenced by OBForceField::SystematicRotorSearchInitialize().

bool Next ( ) [inline]


Select the next rotor key

Returns:
true if there are more rotor keys

Referenced by OBForceField::SystematicRotorSearchInitialize().

std::vector<int> GetKey ( ) [inline]


Get the currently selected rotor key

Returns:
current rotor key

Referenced by OBForceField::SystematicRotorSearchInitialize().

The documentation for this class was generated from the following file:

• rotor.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:58 2008 by 1.5.6.

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

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

Member Function Documentation 864


OBRotorList Member List
This is the complete list of members for OBRotorList, including all inherited members.

AssignTorVals(OBMol &) OBRotorList


BeginRotor(OBRotorIterator &i) OBRotorList [inline]
BeginRotors() OBRotorList [inline]
Clear() OBRotorList
EndRotors() OBRotorList [inline]
FindRotors(OBMol &) OBRotorList
HasFixedAtoms() OBRotorList [inline]
IdentifyEvalAtoms(OBMol &mol) OBRotorList [inline]
IgnoreSymmetryRemoval() OBRotorList [inline]
Init(std::string &fname) OBRotorList [inline]
IsFixedBond(OBBond *) OBRotorList
NextRotor(OBRotorIterator &i) OBRotorList [inline]
OBRotorList() OBRotorList
RemoveSymVals(OBMol &) OBRotorList
SetEvalAtoms(OBMol &) OBRotorList
SetFixAtoms(OBBitVec &fix) OBRotorList [inline]
SetQuiet() OBRotorList [inline]
SetRotAtoms(OBMol &) OBRotorList
SetRotAtomsByFix(OBMol &) OBRotorList
Setup(OBMol &) OBRotorList
Size() OBRotorList [inline]
~OBRotorList() OBRotorList

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

OBRotorList Member List 865


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

OpenBabel::OBRotorList

OBRotorList Member List 866


OBRotorList Class Reference
Given an OBMol, set up a list of possibly rotatable torsions,. More...

#include <rotor.h>

List of all members.

Public Member Functions


OBRotorList ()
~OBRotorList ()
void Clear ()
int Size ()
void Init (std::string &fname)
void SetQuiet ()
void SetFixAtoms (OBBitVec &fix)
bool IsFixedBond (OBBond *)
bool HasFixedAtoms ()
void SetRotAtomsByFix (OBMol &)
bool SetRotAtoms (OBMol &)
bool Setup (OBMol &)
bool FindRotors (OBMol &)
bool SetEvalAtoms (OBMol &)
bool AssignTorVals (OBMol &)
void IgnoreSymmetryRemoval ()
void RemoveSymVals (OBMol &)
bool IdentifyEvalAtoms (OBMol &mol)
Iterator methods
OBRotor * BeginRotor (OBRotorIterator &i)
OBRotor * NextRotor (OBRotorIterator &i)
OBRotorIterator BeginRotors ()
OBRotorIterator EndRotors ()

Detailed Description
Given an OBMol, set up a list of possibly rotatable torsions,.

Constructor & Destructor Documentation

OBRotorList ( )

~OBRotorList ( )

OBRotorList Class Reference 867


Open Babel: API Documentation

Member Function Documentation

void Clear ( void )


Clear the internal list of rotors and reset.

Referenced by OBRotorList::Setup().

int Size ( ) [inline]

Returns:
the number of rotors in this list

Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotorList::Setup(),


OBForceField::SystematicRotorSearchInitialize(), and OBForceField::WeightedRotorSearch().

void Init ( std::string & fname ) [inline]


Intialize the private OBRotorRules database from a specific file.

void SetQuiet ( ) [inline]


Turn off debugging output.

void SetFixAtoms ( OBBitVec & fix ) [inline]


Set the list of fixed (invariant) atoms to the supplied OBBitVec.

bool IsFixedBond ( OBBond * bond )


Return whether this bond is fixed and thus not rotatable.

Returns:
true if the bond and at least one neighboring bond has fixed atoms

Referenced by OBRotorList::FindRotors(), and OBRotorList::SetEvalAtoms().

bool HasFixedAtoms ( ) [inline]

Returns:
whether this rotor list has any fixed (invariant) atoms

Referenced by OBRotorList::FindRotors(), and OBRotorList::SetEvalAtoms().

OBMol
void SetRotAtomsByFix ( mol )
&

Member Function Documentation 868


Open Babel: API Documentation

Set the atoms to rotate from the dihedral atoms for each rotor Insures the fixed atoms are respected, but
otherwise functions like SetRotAtoms().

bool SetRotAtoms ( OBMol & mol )


Set the atoms to rotate from the dihedral atoms for each rotor Uses OBRotor->GetDihedralAtoms() to call
OBRotor->SetRotAtoms() and standarizes the dihedral angles via OBRotor->SetDihedralAtoms().

Returns:
True

bool Setup ( OBMol & mol )


Setup this rotor list for the supplied molecule Calls FindRotors(), SetEvalAtoms(), and AssignTorVals()

Returns:
True if rotatable bonds were found

Referenced by OBForceField::RandomRotorSearchInitialize(),
OBForceField::SystematicRotorSearchInitialize(), and OBForceField::WeightedRotorSearch().

bool FindRotors ( OBMol & mol )


Find all potentially rotatable bonds in the molecule Uses OBBond::IsRotor() for initial evaluation

Returns:
True

Referenced by OBRotorList::Setup().

OBMol
bool SetEvalAtoms ( mol )
&
Determines which atoms should be used to calculate the internal energy if the dihedral angle of the rotor is
modified

Returns:
True

Referenced by OBRotorList::Setup().

OBMol
bool AssignTorVals ( mol )
&
Using the OBRotorRules database, set the torsion values (and delta) to be evaluated and tested

Referenced by OBRotorList::Setup().

Member Function Documentation 869


Open Babel: API Documentation

void IgnoreSymmetryRemoval ( ) [inline]


Has no effect

Deprecated:
Currently has no effect

OBMol
void RemoveSymVals ( mol )
&
Rotates each bond to zero and 180 degrees and tests if the 2 conformers are duplicates. if so - the symmetric
torsion values are removed from consideration during a search

OBRotorIterator
OBRotor* BeginRotor ( i ) [inline]
&

Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotorList::RemoveSymVals(),


OBRotorList::SetEvalAtoms(), OBRotorList::SetRotAtoms(), OBRotorList::SetRotAtomsByFix(),
OBRotorList::Setup(), OBRotamerList::Setup(), OBForceField::SystematicRotorSearchInitialize(), and
OBForceField::WeightedRotorSearch().

OBRotorIterator
OBRotor* NextRotor ( i ) [inline]
&

Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotorList::RemoveSymVals(),


OBRotorList::SetEvalAtoms(), OBRotorList::SetRotAtoms(), OBRotorList::SetRotAtomsByFix(),
OBRotorList::Setup(), OBRotamerList::Setup(), OBForceField::SystematicRotorSearchInitialize(), and
OBForceField::WeightedRotorSearch().

OBRotorIterator BeginRotors ( ) [inline]

OBRotorIterator EndRotors ( ) [inline]

OBMol
bool IdentifyEvalAtoms ( mol ) [inline]
&

Deprecated:
Not declared. Use Setup() for top-level functionality

The documentation for this class was generated from the following files:

• rotor.h
• rotor.cpp

Member Function Documentation 870


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:58 2008 by 1.5.6.

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

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

Member Function Documentation 871


OBRotorRule Member List
This is the complete list of members for OBRotorRule, including all inherited members.

GetDelta() OBRotorRule [inline]


GetReferenceAtoms(int ref[4]) OBRotorRule [inline]
GetSmartsPattern() OBRotorRule [inline]
GetSmartsString() OBRotorRule [inline]
GetTorsionVals() OBRotorRule [inline]
IsValid() OBRotorRule [inline]
OBRotorRule(char *buffer, int ref[4], std::vector< double > &vals, double d) OBRotorRule [inline]
SetDelta(double d) OBRotorRule [inline]
~OBRotorRule() OBRotorRule [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::OBRotorRule

OBRotorRule Member List 872


OBRotorRule Class Reference
A rule for torsional conformer searching, defined by a SMARTS pattern. More...

#include <openbabel/rotor.h>

List of all members.

Public Member Functions


OBRotorRule (char *buffer, int ref[4], std::vector< double > &vals, double d)
~OBRotorRule ()
bool IsValid ()
void GetReferenceAtoms (int ref[4])
void SetDelta (double d)
double GetDelta ()
std::vector< double > & GetTorsionVals ()
std::string & GetSmartsString ()
OBSmartsPattern * GetSmartsPattern ()

Detailed Description
A rule for torsional conformer searching, defined by a SMARTS pattern.

Rules define a SMARTS pattern to match and a set of 4 reference atoms defining the dihedral angle. The rule
can either define a set of possible dihedral angles in degrees and/or a "delta" (i.e., all multiples of delta will be
considered)

Constructor & Destructor Documentation

OBRotorRule ( char * buffer,


int ref[4],
std::vector< double > & vals,
double d
) [inline]

~OBRotorRule ( ) [inline]

Member Function Documentation

bool IsValid ( ) [inline]

OBRotorRule Class Reference 873


Open Babel: API Documentation

Returns:
whether this rotor rule is valid (i.e., is the SMARTS pattern valid)

Referenced by OBRotorRules::ParseLine().

void GetReferenceAtoms ( int ref[4] ) [inline]

Returns:
a copy of the reference atom indexes inside the SMARTS pattern

These should be freed after use.

void SetDelta ( double d ) [inline]


Set the resolution (delta) of a torsional step in degrees.

double GetDelta ( ) [inline]

Returns:
the resolution (delta) of a torsional step in degrees

std::vector<double>& GetTorsionVals ( ) [inline]

Returns:
a reference to the dihedral angles to evaluate (in radians)

std::string& GetSmartsString ( ) [inline]

Returns:
the text of the SMARTS pattern for this rule

OBSmartsPattern* GetSmartsPattern ( ) [inline]

Returns:
the exact OBSmartsPattern object for this rule

The documentation for this class was generated from the following file:

• rotor.h

Member Function Documentation 874


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:58 2008 by 1.5.6.

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

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

Member Function Documentation 875


OBRotorRules Member List
This is the complete list of members for OBRotorRules, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
GetRotorIncrements(OBMol &mol, OBBond *bond, int refs[4],
OBRotorRules
std::vector< double > &vals, double &delta)
[inline,
GetSize() OBRotorRules
virtual]
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
OBRotorRules() OBRotorRules
ParseLine(const char *) OBRotorRules [virtual]
Quiet() OBRotorRules [inline]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetFilename(std::string &s) OBRotorRules [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
[inline,
~OBGlobalDataBase() OBGlobalDataBase
virtual]
~OBRotorRules() OBRotorRules

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

OBRotorRules Member List 876


Open Babel: API Documentation
• Files

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

OpenBabel::OBRotorRules

OBRotorRules Member List 877


OBRotorRules Class Reference
Database of default hybridization torsional rules and SMARTS-defined OBRotorRule objects. More...

#include <openbabel/rotor.h>

Inheritance diagram for OBRotorRules:

[legend]

List of all members.

Public Member Functions


OBRotorRules ()
~OBRotorRules ()
void ParseLine (const char *)
unsigned int GetSize ()
void SetFilename (std::string &s)
void GetRotorIncrements (OBMol &mol, OBBond *bond, int refs[4], std::vector< double
> &vals, double &delta)
void Quiet ()
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
Database of default hybridization torsional rules and SMARTS-defined OBRotorRule objects.

Use to automatically evaluate potentially rotatable bonds to generate lists of dihedral angles to consider. e.g.,
rotamer/conformer energy calculations

OBRotorRules Class Reference 878


Open Babel: API Documentation

Constructor & Destructor Documentation

OBRotorRules ( )

~OBRotorRules ( )

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 rotor rules

Reimplemented from OBGlobalDataBase.

void SetFilename ( std::string & s ) [inline]


Set the filename to be used for the database. Default = torlib.txt.

void GetRotorIncrements ( OBMol & mol,


OBBond * bond,
int refs[4],
std::vector< double > & vals,
double & delta
)
Determine the torsional angles to evaluate based on the database

Parameters:
mol molecule to evaluate
bond rotatable bond to evaluate
refs set to be the atom indexes (in mol) of the dihedral angle
vals set to be the list of angles to evaluate (in radians)
delta potential dihedral angle steps (in degrees)

Referenced by OBRotorList::AssignTorVals().

Detailed Description 879


Open Babel: API Documentation

void Quiet ( ) [inline]


Turn off debugging output from GetRotorIncrements().

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(),
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(),

Member Function Documentation 880


Open Babel: API Documentation

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(),
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(),

Member Data Documentation 881


Open Babel: API Documentation

OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

The documentation for this class was generated from the following files:

• rotor.h
• rotor.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 882


OBSSMatch Member List
This is the complete list of members for OBSSMatch, including all inherited members.

_map OBSSMatch [protected]


_mol OBSSMatch [protected]
_pat OBSSMatch [protected]
_uatoms OBSSMatch [protected]
Match(std::vector< std::vector< int > > &v, int bidx=-1) OBSSMatch
OBSSMatch(OBMol &, Pattern *) OBSSMatch
~OBSSMatch() OBSSMatch

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::OBSSMatch

OBSSMatch Member List 883


OBSSMatch Class Reference
Internal class: performs fast, exhaustive matching used to find just a single match in match() using recursion
and explicit stack handling. More...

#include <openbabel/parsmart.h>

List of all members.

Public Member Functions


OBSSMatch (OBMol &, Pattern *)
~OBSSMatch ()
void Match (std::vector< std::vector< int > > &v, int bidx=-1)

Protected Attributes
bool * _uatoms
OBMol * _mol
Pattern * _pat
std::vector< int > _map

Detailed Description
Internal class: performs fast, exhaustive matching used to find just a single match in match() using recursion
and explicit stack handling.

Constructor & Destructor Documentation

OBSSMatch ( OBMol & mol,


Pattern * pat
)

~OBSSMatch ( )

Member Function Documentation

void Match ( std::vector< std::vector< int > > & v,


bidx =
int
-1
)

OBSSMatch Class Reference 884


Open Babel: API Documentation

Referenced by OpenBabel::match().

Member Data Documentation

bool* _uatoms [protected]

Referenced by OBSSMatch::Match(), OBSSMatch::OBSSMatch(), and OBSSMatch::~OBSSMatch().

OBMol* _mol [protected]

Referenced by OBSSMatch::Match(), and OBSSMatch::OBSSMatch().

Pattern* _pat [protected]

Referenced by OBSSMatch::Match(), and OBSSMatch::OBSSMatch().

std::vector<int> _map [protected]

Referenced by OBSSMatch::Match(), and OBSSMatch::OBSSMatch().

The documentation for this class was generated from the following files:

• parsmart.h
• parsmart.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

Member Function Documentation 885


Open Babel: API Documentation
• Files

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

Member Data Documentation 886


OBScoreGrid Member List
This is the complete list of members for OBScoreGrid, including all inherited members.

Center() OBScoreGrid [inline, virtual]


CenterMol(OBMol &) OBScoreGrid [inline, virtual]
Clear(void) OBScoreGrid [inline, virtual]
Config(std::string) OBScoreGrid [inline, virtual]
Eval(double *) OBScoreGrid [inline, virtual]
Eval(OBMol &mol) OBScoreGrid [inline, virtual]
GetType(void) OBScoreGrid [inline]
gridtype OBScoreGrid [protected]
Init(OBMol &, OBMol &, std::string &, double) OBScoreGrid [inline, virtual]
OBScoreGrid(void) OBScoreGrid [inline]
Read(std::string) OBScoreGrid [inline, virtual]
score OBScoreGrid
SetType(score_t type) OBScoreGrid [inline]
Setup(OBMol &) OBScoreGrid [inline, virtual]
Setup(OBMol &, std::vector< int > &) OBScoreGrid [inline, virtual]
Setup(std::vector< int > &) OBScoreGrid [inline, virtual]
SetVerbose(bool v) OBScoreGrid [inline]
verbose OBScoreGrid [protected]
Write(std::string) OBScoreGrid [inline, virtual]
~OBScoreGrid(void) OBScoreGrid [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:57 2008 by 1.5.6.

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

OBScoreGrid Member List 887


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBScoreGrid

OBScoreGrid Member List 888


OBScoreGrid Class Reference
A base class for scoring docking interactions between multiple molecules. More...

#include <openbabel/grid.h>

List of all members.

Public Member Functions


OBScoreGrid (void)
virtual ~OBScoreGrid (void)
void SetVerbose (bool v)
void SetType (score_t type)
score_t GetType (void)
virtual void Clear (void)
virtual double Eval (double *)
virtual double Eval (OBMol &mol)
virtual void Init (OBMol &, OBMol &, std::string &, double)
virtual void Setup (OBMol &)
virtual void Setup (OBMol &, std::vector< int > &)
virtual void Setup (std::vector< int > &)
virtual void Config (std::string)
virtual bool Read (std::string)
virtual bool Write (std::string)
virtual vector3 Center ()
virtual vector3 CenterMol (OBMol &)

Public Attributes
double score

Protected Attributes
score_t gridtype
bool verbose

Detailed Description
A base class for scoring docking interactions between multiple molecules.

Deprecated:
Will disappear in future versions. Use your own code.

OBScoreGrid Class Reference 889


Open Babel: API Documentation

Constructor & Destructor Documentation

OBScoreGrid ( void ) [inline]

[inline,
virtual ~OBScoreGrid ( void )
virtual]

Member Function Documentation

void SetVerbose ( bool v ) [inline]

void SetType ( score_t type ) [inline]

score_t GetType ( void ) [inline]

[inline,
virtual void Clear ( void )
virtual]

virtual double Eval ( double * ) [inline, virtual]

virtual double Eval ( OBMol & mol ) [inline, virtual]

virtual void Init ( OBMol & ,


OBMol & ,
std::string & ,
double
) [inline, virtual]

virtual void Setup ( OBMol & ) [inline, virtual]

virtual void Setup ( OBMol & ,


std::vector< int > &
) [inline, virtual]

Constructor & Destructor Documentation 890


Open Babel: API Documentation

virtual void Setup ( std::vector< int > & ) [inline, virtual]

virtual void Config ( std::string ) [inline, virtual]

virtual bool Read ( std::string ) [inline, virtual]

virtual bool Write ( std::string ) [inline, virtual]

[inline,
virtual vector3 Center ( )
virtual]

[inline,
virtual vector3 CenterMol ( OBMol & )
virtual]

Member Data Documentation

score_t gridtype [protected]

bool verbose [protected]

double score

The documentation for this class was generated from the following file:

• grid.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:

Member Function Documentation 891


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 Data Documentation 892


OBSerialNums Member List
This is the complete list of members for OBSerialNums, including all inherited members.

_attr OBGenericData [protected]


_serialMap OBSerialNums [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBSerialNums
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() OBSerialNums [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBSerialNums() OBSerialNums [inline]
OBSerialNums(const OBSerialNums &cp) OBSerialNums [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(std::map< int, OBAtom * > &sm) OBSerialNums [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:57 2008 by 1.5.6.

• Main Page

OBSerialNums Member List 893


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

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

OpenBabel::OBSerialNums

OBSerialNums Member List 894


OBSerialNums Class Reference
Defines a map between serial numbers (e.g., in a PDB file) and OBAtom objects inside a molecule. More...

#include <openbabel/generic.h>

Inheritance diagram for OBSerialNums:

[legend]

List of all members.

Public Member Functions


OBSerialNums ()
OBSerialNums (const OBSerialNums &cp)
virtual OBGenericData * Clone (OBBase *) const
std::map< int, OBAtom * > & GetData ()
void SetData (std::map< int, OBAtom * > &sm)
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, OBAtom * > _serialMap
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Defines a map between serial numbers (e.g., in a PDB file) and OBAtom objects inside a molecule.

OBSerialNums Class Reference 895


Open Babel: API Documentation

Constructor & Destructor Documentation

OBSerialNums ( ) [inline]

Referenced by OBSerialNums::Clone().

OBSerialNums ( const OBSerialNums & cp ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]


Member variables contain OBAtom pointers, so copying only valid within same molecule, unless the code is
modified, as in OBRotamerList

Reimplemented from OBGenericData.

std::map<int,OBAtom*>& GetData ( ) [inline]

void SetData ( std::map< int, OBAtom * > & sm ) [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().

[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:

Constructor & Destructor Documentation 896


Open Babel: API Documentation

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, OBAtom*> _serialMap [protected]


map between serial num

Referenced by OBSerialNums::GetData(), OBSerialNums::OBSerialNums(), and OBSerialNums::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

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=().

Member Function Documentation 897


Open Babel: API Documentation

The documentation for this class was generated from the following file:

• generic.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 Data Documentation 898


OBSetData Member List
This is the complete list of members for OBSetData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vdata OBSetData [protected]
AddData(OBGenericData *d) OBSetData [inline]
[inline,
Clone(OBBase *) const OBSetData
virtual]
DeleteData(OBGenericData *gd) OBSetData [inline]
[inline,
GetAttribute() const OBGenericData
virtual]
GetBegin() OBSetData [inline]
GetData(const char *s) OBSetData [inline]
GetData(const std::string &s) OBSetData [inline]
[inline,
GetData() const OBSetData
virtual]
GetDataType() const OBGenericData [inline]
GetEnd() OBSetData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBSetData() OBSetData [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(std::vector< OBGenericData * > &vdata) OBSetData [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.

OBSetData Member List 899


Open Babel: API Documentation

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::OBSetData

OBSetData Member List 900


OBSetData Class Reference
Used to store arbitrary attribute/set relationships. Should be used to store a set of OBGenericData based on an
attribute. More...

#include <openbabel/generic.h>

Inheritance diagram for OBSetData:

[legend]

List of all members.

Public Member Functions


OBSetData ()
virtual OBGenericData * Clone (OBBase *) const
void AddData (OBGenericData *d)
void SetData (std::vector< OBGenericData * > &vdata)
OBGenericData * GetData (const char *s)
OBGenericData * GetData (const std::string &s)
virtual const std::vector
< OBGenericData * > & GetData () const
std::vector< OBGenericData * >
::iterator GetBegin ()
std::vector< OBGenericData * >
::iterator GetEnd ()
void DeleteData (OBGenericData *gd)
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< OBGenericData * > _vdata
std::string _attr
unsigned int _type
DataOrigin _source

OBSetData Class Reference 901


Open Babel: API Documentation

Detailed Description
Used to store arbitrary attribute/set relationships. Should be used to store a set of OBGenericData based on an
attribute.

Constructor & Destructor Documentation

OBSetData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void AddData ( OBGenericData * d ) [inline]


Add an OBGenericData element to the set.

void SetData ( std::vector< OBGenericData * > & vdata ) [inline]


Set the array of data to a new vector.

OBGenericData* GetData ( const char * s ) [inline]

Returns:
the OBGenericData associate with the attribute name parameter.

const
OBGenericData* GetData ( std::string s ) [inline]
&

Returns:
the OBGenericData associate with the attribute name parameter.

virtual const std::vector<OBGenericData *>& GetData ( ) const [inline, virtual]


Gets the entire set.

std::vector<OBGenericData*>::iterator GetBegin ( ) [inline]


Get the begin iterator.

Detailed Description 902


Open Babel: API Documentation

std::vector<OBGenericData*>::iterator GetEnd ( ) [inline]


Get the end iterator.

void DeleteData ( OBGenericData * gd ) [inline]


Delete the matching OBGenericData element.

[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 903


Open Babel: API Documentation

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::vector<OBGenericData *> _vdata [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 file:

• generic.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:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

Member Data Documentation 904


Open Babel: API Documentation
• Classes
• Files

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

Member Data Documentation 905


OBSmartsPattern Member List
This is the complete list of members for OBSmartsPattern, including all inherited members.

_growbond OBSmartsPattern [protected]


_mlist OBSmartsPattern [protected]
_pat OBSmartsPattern [protected]
_str OBSmartsPattern [protected]
BeginMList() OBSmartsPattern [inline]
Empty() const OBSmartsPattern [inline]
EndMList() OBSmartsPattern [inline]
GetAtomicNum(int idx) OBSmartsPattern
GetBond(int &src, int &dst, int &ord, int idx) OBSmartsPattern
GetCharge(int idx) OBSmartsPattern
GetMapList() OBSmartsPattern [inline]
GetSMARTS() const OBSmartsPattern [inline]
GetSMARTS() OBSmartsPattern [inline]
GetUMapList() OBSmartsPattern
GetVectorBinding(int idx) const OBSmartsPattern [inline]
Init(const char *pattern) OBSmartsPattern
Init(const std::string &pattern) OBSmartsPattern
IsValid() const OBSmartsPattern [inline]
Match(OBMol &mol, bool single=false) OBSmartsPattern
NumAtoms() const OBSmartsPattern [inline]
NumBonds() const OBSmartsPattern [inline]
NumMatches() const OBSmartsPattern [inline]
OBSmartsPattern() OBSmartsPattern [inline]
OBSmartsPattern(const OBSmartsPattern &cp) OBSmartsPattern [inline]
operator=(const OBSmartsPattern &cp) OBSmartsPattern [inline]
RestrictedMatch(OBMol &mol, std::vector< std::pair< int, int > >
OBSmartsPattern
&pairs, bool single=false)
RestrictedMatch(OBMol &mol, OBBitVec &bv, bool single=false) OBSmartsPattern
WriteMapList(std::ostream &) OBSmartsPattern
~OBSmartsPattern() OBSmartsPattern [virtual]

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

OBSmartsPattern Member List 906


Open Babel: API Documentation

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::OBSmartsPattern

OBSmartsPattern Member List 907


OBSmartsPattern Class Reference
SMARTS (SMiles ARbitrary Target Specification) substructure searching. More...

#include <openbabel/parsmart.h>

List of all members.

Public Member Functions


OBSmartsPattern ()
virtual ~OBSmartsPattern ()
OBSmartsPattern (const OBSmartsPattern &cp)
OBSmartsPattern & operator= (const OBSmartsPattern &cp)
void WriteMapList (std::ostream &)
Initialization Methods
bool Init (const char *pattern)
bool Init (const std::string &pattern)
Pattern Properties
const std::string & GetSMARTS () const
std::string & GetSMARTS ()
bool Empty () const
bool IsValid () const
unsigned int NumAtoms () const
unsigned int NumBonds () const
void GetBond (int &src, int &dst, int &ord, int idx)
int GetAtomicNum (int idx)
int GetCharge (int idx)
int GetVectorBinding (int idx) const
Matching methods (SMARTS on a specific OBMol)
bool Match (OBMol &mol, bool single=false)
bool RestrictedMatch (OBMol &mol, std::vector< std::pair< int, int > >
&pairs, bool single=false)
bool RestrictedMatch (OBMol &mol, OBBitVec &bv, bool single=false)
unsigned int NumMatches () const
std::vector< std::vector< int > > & GetMapList ()
std::vector< std::vector< int >
>::iterator BeginMList ()
std::vector< std::vector< int >
>::iterator EndMList ()
std::vector< std::vector< int > > & GetUMapList ()

Protected Attributes
std::vector< bool > _growbond
std::vector< std::vector< int > > _mlist
Pattern * _pat
std::string _str

OBSmartsPattern Class Reference 908


Open Babel: API Documentation

Detailed Description
SMARTS (SMiles ARbitrary Target Specification) substructure searching.

Substructure search is an incredibly useful tool in the context of a small molecule programming library.
Having an efficient substructure search engine reduces the amount of hard code needed for molecule
perception, as well as increases the flexibility of certain operations. For instance, atom typing can be easily
performed based on hard coded rules of element type and bond orders (or hybridization). Alternatively, atom
typing can also be done by matching a set of substructure rules read at run time. In the latter case
customization based on application (such as changing the pH) becomes a facile operation. Fortunately for
Open Babel and its users, Roger Sayle donated a SMARTS parser which became the basis for SMARTS
matching in Open Babel.

For more information on the SMARTS support in Open Babel, see the wiki page:
http://openbabel.sourceforge.net/wiki/SMARTS

The SMARTS matcher, or OBSmartsPattern, is a separate object which can match patterns in the OBMol
class. The following code demonstrates how to use the OBSmartsPattern class:

OBMol mol;
...
OBSmartsPattern sp;
sp.Init("CC");
sp.Match(mol);
vector<vector<int> > maplist;
maplist = sp.GetMapList();
//or maplist = sp.GetUMapList();
//print out the results
vector<vector<int> >::iterator i;
vector<int>::iterator j;
for (i = maplist.begin();i != maplist.end();++i)
{
for (j = i->begin();j != i->end();++j)
cout << j << ' `;
cout << endl;
}

The preceding code reads in a molecule, initializes a SMARTS pattern of two single-bonded carbons, and
locates all instances of the pattern in the molecule. Note that calling the Match() function does not return the
results of the substructure match. The results from a match are stored in the OBSmartsPattern, and a call to
GetMapList() or GetUMapList() must be made to extract the results. The function GetMapList() returns all
matches of a particular pattern while GetUMapList() returns only the unique matches. For instance, the
pattern [OD1]~C~[OD1] describes a carboxylate group. This pattern will match both atom number
permutations of the carboxylate, and if GetMapList() is called, both matches will be returned. If
GetUMapList() is called only unique matches of the pattern will be returned. A unique match is defined as
one which does not cover the identical atoms that a previous match has covered.

Protected Attributes 909


Open Babel: API Documentation

Constructor & Destructor Documentation

OBSmartsPattern ( ) [inline]

~OBSmartsPattern ( ) [virtual]

OBSmartsPattern ( const OBSmartsPattern & cp ) [inline]

Member Function Documentation

const
OBSmartsPattern& operator= ( OBSmartsPattern cp ) [inline]
&

bool Init ( const char * pattern )


Parse the pattern SMARTS string.

Returns:
Whether the pattern is a valid SMARTS expression

Referenced by patty::assign_rules(), OBBondTyper::AssignFunctionalGroupBonds(),


OpenBabel::CorrectBadResonanceForm(), OBMol::DoTransformations(), OBChemTsfm::Init(),
OBBuilder::LoadFragments(), OBAtom::MatchesSMARTS(), OBRotorList::OBRotorList(),
OBAromaticTyper::ParseLine(), OBRingTyper::ParseLine(), OBAtomTyper::ParseLine(),
OBPhModel::ParseLine(), OBBondTyper::ParseLine(), and patty::read_rules().

const
bool Init ( std::string pattern )
&
Parse the pattern SMARTS string.

Returns:
Whether the pattern is a valid SMARTS expression

const std::string& GetSMARTS ( ) const [inline]

Returns:
the SMARTS string which is currently used

std::string& GetSMARTS ( ) [inline]

Constructor & Destructor Documentation 910


Open Babel: API Documentation

Returns:
the SMARTS string which is currently used

bool Empty ( ) const [inline]

Returns:
If the SMARTS pattern is an empty expression (e.g., invalid)

bool IsValid ( ) const [inline]

Returns:
If the SMARTS pattern is a valid expression

const
unsigned int NumAtoms ( )
[inline]

Returns:
the number of atoms in the SMARTS pattern

Referenced by OpenBabel::EvalAtomExpr(), OBChemTsfm::Init(), OBChemTsfm::IsAcid(),


OBChemTsfm::IsBase(), and OBPhModel::ParseLine().

unsigned int NumBonds ( ) const [inline]

Returns:
the number of bonds in the SMARTS pattern

Referenced by OBChemTsfm::Init().

void GetBond ( int & src,


int & dst,
int & ord,
int idx
)
Access the bond idx in the internal pattern

Parameters:
src The index of the beginning atom
dst The index of the end atom
ord The bond order of this bond
idx The index of the bond in the SMARTS pattern

Referenced by OBChemTsfm::Init().

Member Function Documentation 911


Open Babel: API Documentation

int GetAtomicNum ( int idx )

Returns:
the atomic number of the atom idx in the internal pattern

Referenced by OBChemTsfm::Init().

int GetCharge ( int idx )

Returns:
the formal charge of the atom idx in the internal pattern

Referenced by OBChemTsfm::Init(), OBChemTsfm::IsAcid(), and OBChemTsfm::IsBase().

const
int GetVectorBinding ( int idx )
[inline]

Returns:
the vector binding of the atom idx in the internal pattern

Referenced by OBChemTsfm::Init().

bool Match ( OBMol & mol,


bool single = false
)
Perform SMARTS matching for the pattern specified using Init().

Parameters:
mol The molecule to use for matching
single Whether only a single match is required (faster). Default is false.

Returns:
Whether matches occurred

Referenced by OBChemTsfm::Apply(), OBBondTyper::AssignFunctionalGroupBonds(),


OpenBabel::CorrectBadResonanceForm(), OBMol::DoTransformations(), and OBAtom::MatchesSMARTS().

bool RestrictedMatch ( OBMol & mol,


std::vector< std::pair< int, int > > & pairs,
single =
bool
false
)

Referenced by OBRotorRules::GetRotorIncrements().

Member Function Documentation 912


Open Babel: API Documentation

bool RestrictedMatch ( OBMol & mol,


OBBitVec & bv,
bool single = false
)

unsigned int NumMatches ( ) const [inline]

Returns:
the number of non-unique SMARTS matches To get the number of unique SMARTS matches, query
GetUMapList()->size()

std::vector<std::vector<int> >& GetMapList ( ) [inline]

Returns:
the entire list of non-unique matches for this pattern

See also:
GetUMapList()

Referenced by OBRotorRules::GetRotorIncrements().

std::vector<std::vector<int> >::iterator BeginMList ( ) [inline]

Returns:
An iterator over the (non-unique) match list, starting at the beginning

std::vector<std::vector<int> >::iterator EndMList ( ) [inline]

Returns:
An iterator over the non-unique match list, set to the end

std::vector<
std::vector< int > > & ( )
GetUMapList

Returns:
the entire list of unique matches for this pattern A unique match is defined as one which does not
cover the identical atoms that a previous match has covered.

For instance, the pattern [OD1]~C~[OD1] describes a carboxylate group. This pattern will match both atom
number permutations of the carboxylate, and if GetMapList() is called, both matches will be returned. If
GetUMapList() is called only unique matches of the pattern will be returned.

Member Function Documentation 913


Open Babel: API Documentation

Referenced by OBChemTsfm::Apply(), OBBondTyper::AssignFunctionalGroupBonds(),


OpenBabel::CorrectBadResonanceForm(), and OBAtom::MatchesSMARTS().

void WriteMapList ( std::ostream & ofs )


Debugging -- write a list of matches to the output stream.

Member Data Documentation

std::vector<bool> _growbond [protected]

Deprecated:
(Not used)

std::vector<std::vector<int> > _mlist [protected]


The list of matches.

Referenced by OBSmartsPattern::GetUMapList(), OBSmartsPattern::Match(),


OBSmartsPattern::RestrictedMatch(), and OBSmartsPattern::WriteMapList().

Pattern* _pat [protected]


The parsed SMARTS pattern.

Referenced by OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetBond(),


OBSmartsPattern::GetCharge(), OBSmartsPattern::Init(), OBSmartsPattern::Match(),
OBSmartsPattern::RestrictedMatch(), and OBSmartsPattern::~OBSmartsPattern().

std::string _str [protected]


The string of the SMARTS expression.

Referenced by OBSmartsPattern::Init(), and OBSmartsPattern::operator=().

The documentation for this class was generated from the following files:

• parsmart.h
• parsmart.cpp

Member Data Documentation 914


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:58 2008 by 1.5.6.

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

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

Member Data Documentation 915


OBSqrtTbl Member List
This is the complete list of members for OBSqrtTbl, including all inherited members.

Init(double max, double incr) OBSqrtTbl [inline]


OBSqrtTbl() OBSqrtTbl [inline]
OBSqrtTbl(const double max, const double incr) OBSqrtTbl [inline]
Sqrt(double d2) const OBSqrtTbl [inline]
~OBSqrtTbl() OBSqrtTbl [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::OBSqrtTbl

OBSqrtTbl Member List 916


OBSqrtTbl Class Reference
Square Root lookup table - given a distance squared returns distance. More...

#include <openbabel/obutil.h>

List of all members.

Public Member Functions


OBSqrtTbl ()
OBSqrtTbl (const double max, const double incr)
~OBSqrtTbl ()
double Sqrt (double d2) const
void Init (double max, double incr)

Detailed Description
Square Root lookup table - given a distance squared returns distance.

Constructor & Destructor Documentation

OBSqrtTbl ( ) [inline]

OBSqrtTbl ( const double max,


const double incr
) [inline]
Create a square root table to handle up to the square root of max (e.g., if you want the square root of 144,
supply 12 for max).

Parameters:
max The maximum square root stored in the lookup table
incr The floating point resolution of the lookup table

~OBSqrtTbl ( ) [inline]

Member Function Documentation

double Sqrt ( double d2 ) const [inline]


Fast square root calculation using a lookup table.

OBSqrtTbl Class Reference 917


Open Babel: API Documentation

Returns:
Square root of d2

void Init ( double max,


double incr
) [inline]
Initialize the square root lookup table.

Parameters:
max The maximum square root stored in the lookup table (e.g., if you want the square root of
144, supply 12 for max)
incr The floating point resolution of the lookup table

The documentation for this class was generated from the following file:

• obutil.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 918


OBStopwatch Member List
This is the complete list of members for OBStopwatch, including all inherited members.

Elapsed() OBStopwatch [inline]


Lap() OBStopwatch [inline]
Start() OBStopwatch [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::OBStopwatch

OBStopwatch Member List 919


OBStopwatch Class Reference
Stopwatch class used for timing length of execution. More...

#include <openbabel/obutil.h>

List of all members.

Public
Member
Functions
void Start ()
double Lap ()
double Elapsed ()

Detailed Description
Stopwatch class used for timing length of execution.

The OBStopwatch class makes timing the execution of blocks of code to microsecond accuracy very simple.
The class effectively has two functions, Start() and Elapsed(). The usage of the OBStopwatch class is
demonstrated by the following code:

OBStopwatch sw;
sw.Start();
//insert code here
cout << "Elapsed time = " << sw.Elapsed() << endl;

Member Function Documentation

void Start ( ) [inline]


Mark the start of "stopwatch" timing.

double Lap ( ) [inline]

Returns:
The time since calling OBStopwatch::Start() in seconds.

double Elapsed ( ) [inline]

Returns:

OBStopwatch Class Reference 920


Open Babel: API Documentation

The time since calling OBStopwatch::Start() in seconds.

The documentation for this class was generated from the following file:

• obutil.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 921


OBSymmetryData Member List
This is the complete list of members for OBSymmetryData, including all inherited members.

_attr OBGenericData [protected]


_pointGroup OBSymmetryData [protected]
_source OBGenericData [protected]
_spaceGroup OBSymmetryData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBSymmetryData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetPointGroup() OBSymmetryData [inline]
GetSpaceGroup() OBSymmetryData [inline]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBSymmetryData() OBSymmetryData
OBSymmetryData(const OBSymmetryData &) OBSymmetryData
operator=(const OBSymmetryData &) OBSymmetryData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(std::string pg, std::string sg="") OBSymmetryData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetPointGroup(std::string pg) OBSymmetryData [inline]
SetSpaceGroup(std::string sg) OBSymmetryData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]
~OBSymmetryData() OBSymmetryData [inline]

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

OBSymmetryData Member List 922


Open Babel: API Documentation

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::OBSymmetryData

OBSymmetryData Member List 923


OBSymmetryData Class Reference
Used to hold the point-group and/or space-group symmetry. More...

#include <openbabel/generic.h>

Inheritance diagram for OBSymmetryData:

[legend]

List of all members.

Public Member Functions


OBSymmetryData ()
OBSymmetryData (const OBSymmetryData &)
virtual OBGenericData * Clone (OBBase *) const
~OBSymmetryData ()
OBSymmetryData & operator= (const OBSymmetryData &)
void SetData (std::string pg, std::string sg="")
void SetPointGroup (std::string pg)
void SetSpaceGroup (std::string sg)
std::string GetPointGroup ()
std::string GetSpaceGroup ()
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 _spaceGroup
std::string _pointGroup
std::string _attr
unsigned int _type
DataOrigin _source

OBSymmetryData Class Reference 924


Open Babel: API Documentation

Detailed Description
Used to hold the point-group and/or space-group symmetry.

Todo:
Add support for translation between symbol notations. Add symmetry perception routines.

Constructor & Destructor Documentation

OBSymmetryData ( )

OBSymmetryData ( const OBSymmetryData & src )

~OBSymmetryData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBSymmetryData & operator= ( const OBSymmetryData & src )

void SetData ( std::string pg,


std::string sg = ""
) [inline]

void SetPointGroup ( std::string pg ) [inline]

void SetSpaceGroup ( std::string sg ) [inline]

std::string GetPointGroup ( ) [inline]

std::string GetSpaceGroup ( ) [inline]

Detailed Description 925


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::string _spaceGroup [protected]

Referenced by OBSymmetryData::operator=().

Member Function Documentation 926


Open Babel: API Documentation

std::string _pointGroup [protected]

Referenced by OBSymmetryData::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

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

Member Data Documentation 927


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 928


OBTorsion Member List
This is the complete list of members for OBTorsion, including all inherited members.

_ads OBTorsion [protected]


_bc OBTorsion [protected]
AddTorsion(OBAtom *a, OBAtom *b, OBAtom *c, OBAtom *d) OBTorsion
AddTorsion(quad< OBAtom *, OBAtom *, OBAtom *, OBAtom *
OBTorsion
> &atoms)
Clear() OBTorsion
Empty() OBTorsion [inline]
GetADs() OBTorsion [inline]
GetAngle(double &radians, unsigned int index=0) OBTorsion
GetBC() OBTorsion [inline]
GetBondIdx() OBTorsion
GetSize() const OBTorsion [inline]
GetTorsions() OBTorsion [protected]
IsProtonRotor() OBTorsion
OBMol class OBTorsion [friend]
[inline,
OBTorsion() OBTorsion
protected]
OBTorsion(OBAtom *, OBAtom *, OBAtom *, OBAtom *) OBTorsion [protected]
OBTorsion(const OBTorsion &) OBTorsion
OBTorsionData class OBTorsion [friend]
operator=(const OBTorsion &) OBTorsion
SetAngle(double radians, unsigned int index=0) OBTorsion
SetData(OBBond *) OBTorsion [inline]
~OBTorsion() OBTorsion [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.

OBTorsion Member List 929


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

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

OpenBabel::OBTorsion

OBTorsion Member List 930


OBTorsion Class Reference
Used to hold the torsion data for a single rotatable bond and all four atoms around it. More...

#include <openbabel/generic.h>

List of all members.

Public Member Functions


OBTorsion (const OBTorsion &)
~OBTorsion ()
OBTorsion & operator= (const OBTorsion &)
void Clear ()
bool Empty ()
bool AddTorsion (OBAtom *a, OBAtom *b, OBAtom *c, OBAtom
*d)
bool AddTorsion (quad< OBAtom *, OBAtom *, OBAtom *,
OBAtom * > &atoms)
bool SetAngle (double radians, unsigned int index=0)
bool SetData (OBBond *)
bool GetAngle (double &radians, unsigned int index=0)
unsigned int GetBondIdx ()
unsigned int GetSize () const
std::pair< OBAtom *, OBAtom * > GetBC ()
std::vector< triple< OBAtom
*, OBAtom *, double > > GetADs ()
bool IsProtonRotor ()

Protected Member Functions


OBTorsion ()
OBTorsion (OBAtom *, OBAtom *, OBAtom *, OBAtom *)
std::vector< quad< OBAtom
*, OBAtom *, OBAtom *, OBAtom * > > GetTorsions ()

Protected Attributes
std::pair< OBAtom *, OBAtom * > _bc
std::vector< triple< OBAtom
*, OBAtom *, double > > _ads

Friends
class OBMol
class OBTorsionData

OBTorsion Class Reference 931


Open Babel: API Documentation

Detailed Description
Used to hold the torsion data for a single rotatable bond and all four atoms around it.

Constructor & Destructor Documentation

OBTorsion ( ) [inline, protected]

OBTorsion ( OBAtom * a,
OBAtom * b,
OBAtom * c,
OBAtom * d
) [protected]
OBTorsion constructor.

OBTorsion ( const OBTorsion & src )


OBTorsion copy constructor.

~OBTorsion ( ) [inline]

Member Function Documentation

vector< quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > > GetTorsions ( ) [protected]
Returns all the 4 atom sets in OBTorsion.

const
OBTorsion & operator= ( OBTorsion src )
&
OBTorsion assignment operator.

void Clear ( void )


Returns the OBTorsion to its original state.

Referenced by OBMol::FindTorsions().

bool Empty ( ) [inline]

Referenced by OBTorsion::AddTorsion().

Detailed Description 932


Open Babel: API Documentation

bool AddTorsion ( OBAtom * a,


OBAtom * b,
OBAtom * c,
OBAtom * d
)
adds a new torsion to the OBTorsion object

Referenced by OBMol::FindTorsions().

quad< OBAtom
*, OBAtom *,
bool AddTorsion ( atoms )
OBAtom *,
OBAtom * > &
adds a new torsion to the OBTorsion object

bool SetAngle ( double radians,


unsigned int index = 0
)
Sets the angle of a torsion in OBTorsion.

Parameters:
radians the value to assign to the torsion
index the index into the torsion of the OBTorsion

Returns:
boolean success

bool SetData ( OBBond * ) [inline]

bool GetAngle ( double & radians,


unsigned int index = 0
)
Obtains the angle of a torsion in OBTorsion.

Parameters:
radians the value of the angle is set here
index the index into the torsion of the OBTorsion

Returns:
boolean success

unsigned int GetBondIdx ( )

Member Function Documentation 933


Open Babel: API Documentation

Gets the bond index of the central bond

Returns:
int bond index

unsigned int GetSize ( ) const [inline]

Referenced by OBMol::FindTorsions().

std::pair<OBAtom*,OBAtom*> GetBC ( ) [inline]


Gets the two central atoms of ABCD torsion

Returns:
pair<OBAtom*,OBAtom*>

std::vector<triple<OBAtom*,OBAtom*,double> > GetADs ( ) [inline]


Gets the vector of distal atoms of ABCD torsion

Returns:
vector of A,D atom pointers and a double

bool IsProtonRotor ( )
determines if torsion has only protons on either the a or d end

Returns:
boolean

Friends And Related Function Documentation

friend class OBMol [friend]

friend class OBTorsionData [friend]

Member Data Documentation

std::pair<OBAtom*,OBAtom*> _bc [protected]

Referenced by OBTorsion::AddTorsion(), OBTorsion::Clear(), OBTorsion::GetBondIdx(),


OBTorsion::GetTorsions(), OBTorsion::OBTorsion(), and OBTorsion::operator=().

Friends And Related Function Documentation 934


Open Babel: API Documentation

std::vector<triple<OBAtom*,OBAtom*,double> > _ads [protected]


double is angle in radians

Referenced by OBTorsion::AddTorsion(), OBTorsion::Clear(), OBTorsion::GetAngle(),


OBTorsion::GetTorsions(), OBTorsion::IsProtonRotor(), OBTorsion::OBTorsion(), OBTorsion::operator=(),
and OBTorsion::SetAngle().

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
• Class Members

Member Data Documentation 935


OBTorsionData Member List
This is the complete list of members for OBTorsionData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_torsions OBTorsionData [protected]
_type OBGenericData [protected]
Clear() OBTorsionData
[inline,
Clone(OBBase *) const OBTorsionData
virtual]
FillTorsionArray(std::vector< std::vector< unsigned int > > &torsions) OBTorsionData
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() const OBTorsionData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetSize() const OBTorsionData [inline]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBMol class OBTorsionData [friend]
OBTorsionData() OBTorsionData [protected]
OBTorsionData(const OBTorsionData &) OBTorsionData [protected]
operator=(const OBTorsionData &) OBTorsionData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(OBTorsion &torsion) OBTorsionData
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

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

OBTorsionData Member List 936


Open Babel: API Documentation

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::OBTorsionData

OBTorsionData Member List 937


OBTorsionData Class Reference
Used to hold torsions as generic data for OBMol. More...

#include <openbabel/generic.h>

Inheritance diagram for OBTorsionData:

[legend]

List of all members.

Public Member Functions


OBTorsionData & operator= (const OBTorsionData &)
virtual OBGenericData * Clone (OBBase *) const
void Clear ()
std::vector< OBTorsion > GetData () const
unsigned int GetSize () const
void SetData (OBTorsion &torsion)
bool FillTorsionArray (std::vector< std::vector< unsigned int > > &torsions)
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


OBTorsionData ()
OBTorsionData (const OBTorsionData &)

Protected Attributes
std::vector< OBTorsion > _torsions
std::string _attr
unsigned int _type
DataOrigin _source

OBTorsionData Class Reference 938


Open Babel: API Documentation

Friends
class OBMol

Detailed Description
Used to hold torsions as generic data for OBMol.

Filled by OBMol::FindTorsions()

Constructor & Destructor Documentation

OBTorsionData ( ) [protected]

OBTorsionData ( const OBTorsionData & src ) [protected]

Member Function Documentation

OBTorsionData & operator= ( const OBTorsionData & src )

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Todo:
Needs to be updated to rebase atom pointers (or use indexes)

Reimplemented from OBGenericData.

void Clear ( void )

std::vector<OBTorsion> GetData ( ) const [inline]


Gets a vector of the OBTorsion objects

Returns:
the vector of torsions

unsigned int GetSize ( ) const [inline]


Gets the number of torsion structs

Returns:
integer count of the number of torsions

Friends 939
Open Babel: API Documentation

void SetData ( OBTorsion & torsion )

Referenced by OBMol::FindTorsions().

bool FillTorsionArray ( std::vector< std::vector< unsigned int > > & torsions )
Fills a vector with the indices of the atoms in torsions (ordered abcd).

Parameters:
torsions reference to the vector of abcd atom sets

Returns:
boolean success

Referenced by OBMolTorsionIter::OBMolTorsionIter().

[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

Member Function Documentation 940


Open Babel: API Documentation

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<OBTorsion> _torsions [protected]

Referenced by OBTorsionData::Clear(), OBTorsionData::FillTorsionArray(), OBTorsionData::operator=(),


and OBTorsionData::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

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

Friends And Related Function Documentation 941


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 942


OBTypeTable Member List
This is the complete list of members for OBTypeTable, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
GetFromType() OBTypeTable
GetSize() OBTypeTable [inline, virtual]
GetToType() OBTypeTable
Init() OBGlobalDataBase
OBGlobalDataBase() OBGlobalDataBase [inline]
OBTypeTable(void) OBTypeTable
ParseLine(const char *) OBTypeTable [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetFromType(const char *) OBTypeTable
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
SetToType(const char *) OBTypeTable
Translate(char *to, const char *from) OBTypeTable
Translate(std::string &to, const std::string &from) OBTypeTable
Translate(const std::string &from) OBTypeTable
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]
~OBTypeTable() OBTypeTable [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:55 2008 by 1.5.6.

• Main Page
• Related Pages

OBTypeTable Member List 943


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

OpenBabel::OBTypeTable

OBTypeTable Member List 944


OBTypeTable Class Reference
Atom Type Translation Table. More...

#include <openbabel/data.h>

Inheritance diagram for OBTypeTable:

[legend]

List of all members.

Public Member Functions


OBTypeTable (void)
~OBTypeTable ()
void ParseLine (const char *)
unsigned int GetSize ()
bool SetFromType (const char *)
bool SetToType (const char *)
bool Translate (char *to, const char *from)
bool Translate (std::string &to, const std::string &from)
std::string Translate (const std::string &from)
std::string GetFromType ()
std::string GetToType ()
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

OBTypeTable Class Reference 945


Open Babel: API Documentation

Detailed Description
Atom Type Translation Table.

Molecular file formats frequently store information about atoms in an atom type field. Some formats store
only the element for each atom, while others include hybridization and local environments, such as the Sybyl
mol2 atom type field. The OBTypeTable class acts as a translation table to convert atom types between a
number of different molecular file formats. The constructor for OBTypeTable automatically reads the text file
types.txt. Just as OBElementTable, an instance of OBTypeTable (ttab) is declared external in data.cpp and is
referenced as extern OBTypeTable ttab in mol.h. The following code demonstrates how to use the
OBTypeTable class to translate the internal representation of atom types in an OBMol Internal to Sybyl Mol2
atom types.

ttab.SetFromType("INT");
ttab.SetToType("SYB");
OBAtom *atom;
vector<OBAtom*>::iterator i;
string src,dst;
for (atom = mol.BeginAtom(i);atom;atom = mol.EndAtom(i))
{
src = atom->GetType();
ttab.Translate(dst,src);
cout << "atom number " << atom->GetIdx() << "has mol2 type " << dst << endl;
}

Current atom types include (defined in the top line of the data file types.txt):

• INT (Open Babel internal codes)


• ATN (atomic numbers)
• HYB (hybridization)
• MMD (MacroModel)
• MM2 (MM2 force field)
• XYZ (element symbols from XYZ file format)
• ALC (Alchemy)
• HAD (H added)
• MCML (MacMolecule)
• C3D (Chem3D)
• SYB (Sybyl mol2)
• MOL (Sybyl mol)
• MAP (Gasteiger partial charge types)
• DRE (Dreiding)
• XED (XED format)
• DOK (Dock)
• M3D (Molecular Arts M3D)
• IDX (Index -- i.e., line number in the file)
• SBN (Sybyl descriptor types for MPD files)
• PCM (PC Model)

Detailed Description 946


Open Babel: API Documentation

Constructor & Destructor Documentation

OBTypeTable ( void )

~OBTypeTable ( ) [inline]

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 atom types in the translation table

Reimplemented from OBGlobalDataBase.

bool SetFromType ( const char * from )


Set the initial atom type to be translated.

Referenced by OBAtom::GetType().

bool SetToType ( const char * to )


Set the destination atom type for translation.

Referenced by OBAtom::GetType().

bool Translate ( char * to,


const char * from
)
Translate atom types.

Translates atom types (to, from), checking for size of destination string and null-terminating as needed

Deprecated:
Because there is no guarantee on the length of an atom type you should consider using std::string
instead

Constructor & Destructor Documentation 947


Open Babel: API Documentation

Referenced by OBAtom::GetType().

bool Translate ( std::string & to,


const std::string & from
)
Translate atom types

Returns:
whether the translation was successful

std::string Translate ( const std::string & from )


Translate atom types

Returns:
the translated atom type, or an empty string if not possible

std::string GetFromType ( )

Returns:
the initial atom type to be translated

Referenced by OBAtom::GetType().

std::string GetToType ( )

Returns:
the destination atom type for translation

Referenced by OBAtom::GetType().

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(),

Member Function Documentation 948


Open Babel: API Documentation

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(),
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]

Member Data Documentation 949


Open Babel: API Documentation

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(),
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:

• data.h
• data.cpp

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

Member Data Documentation 950


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 951


OBUnitCell Member List
This is the complete list of members for OBUnitCell, including all inherited members.

_a OBUnitCell [protected]
_alpha OBUnitCell [protected]
_attr OBGenericData [protected]
_b OBUnitCell [protected]
_beta OBUnitCell [protected]
_c OBUnitCell [protected]
_gamma OBUnitCell [protected]
_lattice OBUnitCell [protected]
_offset OBUnitCell [protected]
_source OBGenericData [protected]
_spaceGroup OBUnitCell [protected]
_spaceGroupName OBUnitCell [protected]
_type OBGenericData [protected]
_v1 OBUnitCell [protected]
_v2 OBUnitCell [protected]
_v3 OBUnitCell [protected]
[inline,
Clone(OBBase *) const OBUnitCell
virtual]
Cubic enum value OBUnitCell
FillUnitCell(OBMol *) OBUnitCell
GetA() OBUnitCell [inline]
GetAlpha() OBUnitCell [inline]
[inline,
GetAttribute() const OBGenericData
virtual]
GetB() OBUnitCell [inline]
GetBeta() OBUnitCell [inline]
GetC() OBUnitCell [inline]
GetCellMatrix() OBUnitCell
GetCellVectors() OBUnitCell
GetCellVolume() OBUnitCell
GetDataType() const OBGenericData [inline]
GetFractionalMatrix() OBUnitCell
GetGamma() OBUnitCell [inline]
GetLatticeType(int spacegroup) OBUnitCell
GetLatticeType() OBUnitCell
GetOffset() OBUnitCell [inline]
[inline,
GetOrigin() const OBGenericData
virtual]

OBUnitCell Member List 952


Open Babel: API Documentation

GetOrthoMatrix() OBUnitCell
GetSpaceGroup() OBUnitCell [inline]
GetSpaceGroupName() OBUnitCell [inline]
GetSpaceGroupNumber(std::string name="") OBUnitCell
[inline,
GetValue() const OBGenericData
virtual]
Hexagonal enum value OBUnitCell
LatticeType enum name OBUnitCell
Monoclinic enum value OBUnitCell
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBUnitCell() OBUnitCell
OBUnitCell(const OBUnitCell &) OBUnitCell
operator=(const OBUnitCell &) OBUnitCell
Orthorhombic enum value OBUnitCell
Rhombohedral enum value OBUnitCell
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(const double a, const double b, const double c, const double
OBUnitCell [inline]
alpha, const double beta, const double gamma)
SetData(const vector3 v1, const vector3 v2, const vector3 v3) OBUnitCell
SetLatticeType(const LatticeType lt) OBUnitCell [inline]
SetOffset(const vector3 v1) OBUnitCell [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetSpaceGroup(const SpaceGroup *sg) OBUnitCell [inline]
SetSpaceGroup(const std::string sg) OBUnitCell [inline]
SetSpaceGroup(const int sg) OBUnitCell [inline]
Tetragonal enum value OBUnitCell
Triclinic enum value OBUnitCell
Undefined enum value OBUnitCell
[inline,
~OBGenericData() OBGenericData
virtual]
~OBUnitCell() OBUnitCell [inline]

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

OBUnitCell Member List 953


Open Babel: API Documentation

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::OBUnitCell

OBUnitCell Member List 954


OBUnitCell Class Reference
Used for storing information about periodic boundary conditions with conversion to/from translation vectors
and (a, b, c, alpha, beta, gamma). More...

#include <openbabel/generic.h>

Inheritance diagram for OBUnitCell:

[legend]

List of all members.

Public Types
enum LatticeType {
Undefined, Triclinic, Monoclinic, Orthorhombic,
Tetragonal, Rhombohedral, Hexagonal, Cubic
}

Public Member Functions


OBUnitCell ()
OBUnitCell (const OBUnitCell &)
virtual OBGenericData * Clone (OBBase *) const
~OBUnitCell ()
OBUnitCell & operator= (const OBUnitCell &)
void SetData (const double a, const double b, const double c, const double
alpha, const double beta, const double gamma)
void SetData (const vector3 v1, const vector3 v2, const vector3 v3)
void SetOffset (const vector3 v1)
void SetSpaceGroup (const SpaceGroup *sg)
void SetSpaceGroup (const std::string sg)
void SetSpaceGroup (const int sg)
void SetLatticeType (const LatticeType lt)
void FillUnitCell (OBMol *)
double GetA ()
double GetB ()
double GetC ()
double GetAlpha ()
double GetBeta ()
double GetGamma ()

OBUnitCell Class Reference 955


Open Babel: API Documentation

vector3 GetOffset ()
const SpaceGroup * GetSpaceGroup ()
const std::string GetSpaceGroupName ()
LatticeType GetLatticeType (int spacegroup)
LatticeType GetLatticeType ()
std::vector< vector3 > GetCellVectors ()
matrix3x3 GetCellMatrix ()
matrix3x3 GetOrthoMatrix ()
matrix3x3 GetFractionalMatrix ()
int GetSpaceGroupNumber (std::string name="")
double GetCellVolume ()
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
double _a
double _b
double _c
double _alpha
double _beta
double _gamma
vector3 _offset
vector3 _v1
vector3 _v2
vector3 _v3
std::string _spaceGroupName
const SpaceGroup * _spaceGroup
LatticeType _lattice
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used for storing information about periodic boundary conditions with conversion to/from translation vectors
and (a, b, c, alpha, beta, gamma).

Member Enumeration Documentation

enum LatticeType

Enumerator:

Public Member Functions 956


Open Babel: API Documentation

Undefined
Triclinic
Monoclinic
Orthorhombic
Tetragonal
Rhombohedral also called trigonal
Hexagonal
Cubic

Constructor & Destructor Documentation

OBUnitCell ( )
public constructor

OBUnitCell ( const OBUnitCell & src )

~OBUnitCell ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBUnitCell & operator= ( const OBUnitCell & src )

void SetData ( const double a,


const double b,
const double c,
const double alpha,
const double beta,
const double gamma
) [inline]
Sets the vectors and angles of the unitcell.

Parameters:
a The length a
b The length b
c The length c
alpha The angle alpha

Member Enumeration Documentation 957


Open Babel: API Documentation

beta The angle beta


gamma The angle gamma

void SetData ( const vector3 v1,


const vector3 v2,
const vector3 v3
)
Sets the vectors, angles and lengths of the unitcell.

The angles and lengths of the unitcell will be calculated from the vectors v1, v2 and v3. Those vectors will
as well be stored internally. Implements blue-obelisk:convertCartesianIntoNotionalCoordinates

Parameters:
v1 The x-vector
v2 The y-vector
v3 The z-vector

See also:
OBUnitCell::GetCellVectors

const
void SetOffset ( v1 ) [inline]
vector3
Set the offset to the origin to v1.

void SetSpaceGroup ( const SpaceGroup * sg ) [inline]


Set the space group for this unit cell. Does not create an OBSymmetryData entry

void SetSpaceGroup ( const std::string sg ) [inline]


Set the space group symbol for this unit cell. Does not create an OBSymmetryData entry or attempt to convert
between different symbol notations

void SetSpaceGroup ( const int sg ) [inline]


Set the space group for this unit cell. Each spacegroup-symbol has a numeric equivalent which is easier to use
to convert between notations. Does not create an OBSymmetryData entry or attempt to convert between
different symbol notations

void SetLatticeType ( const LatticeType lt ) [inline]


Set the Bravais lattice type for this unit cell.

void FillUnitCell ( OBMol * mol )


Duplicate symmetry-unique atoms to fill out the unit cell of the molecule, based on the known space group

Member Function Documentation 958


Open Babel: API Documentation

double GetA ( ) [inline]

Returns:
vector a

double GetB ( ) [inline]

Returns:
vector b

double GetC ( ) [inline]

Returns:
vector c

double GetAlpha ( ) [inline]

Returns:
angle alpha

double GetBeta ( ) [inline]

Returns:
angle beta

double GetGamma ( ) [inline]

Returns:
angle gamma

vector3 GetOffset ( ) [inline]

Returns:
any offset in the origin of the periodic boundaries

const SpaceGroup* GetSpaceGroup ( ) [inline]

Returns:
the text representation of the space group for this unit cell

Referenced by OBUnitCell::FillUnitCell().

Member Function Documentation 959


Open Babel: API Documentation

const std::string GetSpaceGroupName ( ) [inline]

Returns:
the text representation of the space group for this unit cell

OBUnitCell::LatticeType GetLatticeType ( int spacegroup )

Returns:
lattice type (based on the spacegroup)

OBUnitCell::LatticeType GetLatticeType ( )

Returns:
lattice type (based on angles and distances)

Referenced by OBUnitCell::GetCellVolume().

vector< vector3 > GetCellVectors ( )


Implements blue-obelisk:convertNotionalIntoCartesianCoordinates.

Returns:
v1, v2, v3 cell vectors

matrix3x3 GetCellMatrix ( )

Returns:
v1, v2, v3 cell vectors as a 3x3 matrix

matrix3x3 GetOrthoMatrix ( )
Implements blue-obelisk:calculateOrthogonalisationMatrix.

Returns:
The orthogonalization matrix, used for converting from fractional to Cartesian coords.

Referenced by OBUnitCell::FillUnitCell(), OBUnitCell::GetCellMatrix(), and OBUnitCell::GetCellVectors().

matrix3x3 GetFractionalMatrix ( )

Returns:
The fractionalization matrix, used for converting from Cartesian to fractional coords.

Matrix to convert from Cartesian to fractional Implements


blue-obelisk:convertCartesianIntoFractionalCoordinates

Member Function Documentation 960


Open Babel: API Documentation

Referenced by OBUnitCell::FillUnitCell().

int GetSpaceGroupNumber ( std::string name = "" )

Returns:
The numeric value of the given spacegroup

double GetCellVolume ( )

Returns:
The cell volume (in Angstroms^3)

[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]

Member Function Documentation 961


Open Babel: API Documentation

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

double _a [protected]

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

double _b [protected]

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

double _c [protected]

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

double _alpha [protected]

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

double _beta [protected]

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

double _gamma [protected]

Member Data Documentation 962


Open Babel: API Documentation

Referenced by OBUnitCell::GetCellVolume(), OBUnitCell::GetFractionalMatrix(),


OBUnitCell::GetLatticeType(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and
OBUnitCell::SetData().

vector3 _offset [protected]


offset for origin

Referenced by OBUnitCell::operator=().

vector3 _v1 [protected]

Referenced by OBUnitCell::GetCellMatrix(), OBUnitCell::GetCellVectors(), OBUnitCell::operator=(), and


OBUnitCell::SetData().

vector3 _v2 [protected]

Referenced by OBUnitCell::GetCellMatrix(), OBUnitCell::GetCellVectors(), OBUnitCell::operator=(), and


OBUnitCell::SetData().

vector3 _v3 [protected]


translation vectors

Referenced by OBUnitCell::GetCellMatrix(), OBUnitCell::GetCellVectors(), OBUnitCell::operator=(), and


OBUnitCell::SetData().

std::string _spaceGroupName [protected]

Referenced by OBUnitCell::GetSpaceGroupNumber(), and OBUnitCell::operator=().

const SpaceGroup* _spaceGroup [protected]

Referenced by OBUnitCell::GetLatticeType(), OBUnitCell::GetSpaceGroupNumber(), and


OBUnitCell::operator=().

LatticeType _lattice [protected]

Referenced by OBUnitCell::GetLatticeType(), and OBUnitCell::operator=().

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Member Data Documentation 963


Open Babel: API Documentation

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

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 964


OBVectorData Member List
This is the complete list of members for OBVectorData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vec OBVectorData [protected]
[inline,
Clone(OBBase *) const OBVectorData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() const OBVectorData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBVectorData() OBVectorData [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(double x, double y, double z) OBVectorData [inline]
SetData(vector3 data) OBVectorData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]
[inline,
~OBVectorData() OBVectorData
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.

OBVectorData Member List 965


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

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

OpenBabel::OBVectorData

OBVectorData Member List 966


OBVectorData Class Reference
Used to hold a 3D vector item (e.g., a dipole moment). More...

#include <openbabel/generic.h>

Inheritance diagram for OBVectorData:

[legend]

List of all members.

Public Member Functions


OBVectorData ()
virtual ~OBVectorData ()
virtual OBGenericData * Clone (OBBase *) const
void SetData (double x, double y, double z)
void SetData (vector3 data)
vector3 GetData () 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
vector3 _vec
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to hold a 3D vector item (e.g., a dipole moment).

Since:
version 2.2

OBVectorData Class Reference 967


Open Babel: API Documentation

Constructor & Destructor Documentation

OBVectorData ( ) [inline]

[inline,
virtual ~OBVectorData ( )
virtual]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetData ( double x,


double y,
double z
) [inline]

void SetData ( vector3 data ) [inline]

vector3 GetData ( ) const [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().

[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().

Detailed Description 968


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]

Member Data Documentation

vector3 _vec [protected]


3D vector to be stored

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=(),

Member Function Documentation 969


Open Babel: API Documentation

OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following file:

• generic.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 Data Documentation 970


OBVibrationData Member List
This is the complete list of members for OBVibrationData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vFrequencies OBVibrationData [protected]
_vIntensities OBVibrationData [protected]
_vLx OBVibrationData [protected]
[inline,
Clone(OBBase *) const OBVibrationData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
GetFrequencies() const OBVibrationData [inline]
GetIntensities() const OBVibrationData [inline]
GetLx() const OBVibrationData [inline]
GetNumberOfFrequencies() const OBVibrationData
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBVibrationData() OBVibrationData [inline]
operator=(const OBVibrationData &) OBVibrationData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(const std::vector< std::vector< vector3 > > &, const
OBVibrationData
std::vector< double > &, const std::vector< double > &)
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]
[inline,
~OBVibrationData() OBVibrationData
virtual]

OBVibrationData Member List 971


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::OBVibrationData

OBVibrationData Member List 972


OBVibrationData Class Reference
Used to hold the normal modes of a molecule, etc. More...

#include <openbabel/generic.h>

Inheritance diagram for OBVibrationData:

[legend]

List of all members.

Public Member Functions


OBVibrationData ()
virtual ~OBVibrationData ()
virtual OBGenericData * Clone (OBBase *) const
OBVibrationData & operator= (const OBVibrationData &)
void SetData (const std::vector< std::vector< vector3 > > &, const std::vector< double >
&, const std::vector< double > &)
std::vector< std::vector
< vector3 > > GetLx () const
std::vector< double > GetFrequencies () const
std::vector< double > GetIntensities () const
unsigned int GetNumberOfFrequencies () 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< std::vector
< vector3 > > _vLx
std::vector< double > _vFrequencies
std::vector< double > _vIntensities
std::string _attr
unsigned int _type
DataOrigin _source

OBVibrationData Class Reference 973


Open Babel: API Documentation

Detailed Description
Used to hold the normal modes of a molecule, etc.

Constructor & Destructor Documentation

OBVibrationData ( ) [inline]

[inline,
virtual ~OBVibrationData ( )
virtual]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBVibrationData& operator= ( const OBVibrationData & )

const std::vector<
void SetData ( std::vector< vLx,
vector3 > > &
const std::vector<
vFrequencies,
double > &
const std::vector<
vIntensities
double > &
)
Assign the data.

Parameters:
vLx Normal modes in 1/sqrt(a.u.)
vFrequencies Harmonic frequencies in inverse centimeters
vIntensities Infrared absorption intensities in KM/Mole

std::vector< std::vector< vector3 > > GetLx ( ) const [inline]

std::vector<double> GetFrequencies ( ) const [inline]

Detailed Description 974


Open Babel: API Documentation

std::vector<double> GetIntensities ( ) const [inline]

unsigned int GetNumberOfFrequencies ( ) const


Get the number of frequencies.

[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 Function Documentation 975


Open Babel: API Documentation

Member Data Documentation

std::vector< std::vector< vector3 > > _vLx [protected]


Normal modes in 1/sqrt(a.u.).

Referenced by OBVibrationData::SetData().

std::vector<double> _vFrequencies [protected]


Harmonic frequencies in inverse centimeters.

Referenced by OBVibrationData::GetNumberOfFrequencies(), and OBVibrationData::SetData().

std::vector<double> _vIntensities [protected]


Infrared absorption intensities in KM/Mole.

Referenced by OBVibrationData::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

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 976


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 977


OBVirtualBond Member List
This is the complete list of members for OBVirtualBond, including all inherited members.

_attr OBGenericData [protected]


_bgn OBVirtualBond [protected]
_end OBVirtualBond [protected]
_ord OBVirtualBond [protected]
_source OBGenericData [protected]
_stereo OBVirtualBond [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBVirtualBond
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetBgn() OBVirtualBond [inline]
GetDataType() const OBGenericData [inline]
GetEnd() OBVirtualBond [inline]
GetOrder() OBVirtualBond [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetStereo() OBVirtualBond [inline]
[inline,
GetValue() const OBGenericData
virtual]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBVirtualBond() OBVirtualBond
OBVirtualBond(int, int, int, int stereo=0) OBVirtualBond
SetAttribute(const std::string &v) OBGenericData [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.

OBVirtualBond Member List 978


Open Babel: API Documentation

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::OBVirtualBond

OBVirtualBond Member List 979


OBVirtualBond Class Reference
Used to temporarily store bonds that reference an atom that has not yet been added to a molecule. More...

#include <openbabel/generic.h>

Inheritance diagram for OBVirtualBond:

[legend]

List of all members.

Public Member Functions


OBVirtualBond ()
virtual OBGenericData * Clone (OBBase *) const
OBVirtualBond (int, int, int, int stereo=0)
int GetBgn ()
int GetEnd ()
int GetOrder ()
int GetStereo ()
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
int _bgn
int _end
int _ord
int _stereo
std::string _attr
unsigned int _type
DataOrigin _source

OBVirtualBond Class Reference 980


Open Babel: API Documentation

Detailed Description
Used to temporarily store bonds that reference an atom that has not yet been added to a molecule.

Constructor & Destructor Documentation

OBVirtualBond ( )

OBVirtualBond ( int bgn,


int end,
int ord,
int stereo = 0
)

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

int GetBgn ( ) [inline]

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

int GetEnd ( ) [inline]

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

int GetOrder ( ) [inline]

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

int GetStereo ( ) [inline]

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Detailed Description 981


Open Babel: API Documentation

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

int _bgn [protected]

int _end [protected]

Member Function Documentation 982


Open Babel: API Documentation

int _ord [protected]

int _stereo [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:

• 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

Member Data Documentation 983


Open Babel: API Documentation
• Files

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

Member Data Documentation 984


OpTransform Member List
This is the complete list of members for OpTransform, including all inherited members.

_id OBPlugin [protected]


[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
[inline,
Begin(const char *PluginID) OBPlugin
static]
Description() OpTransform [virtual]
Display(std::string &txt, const char *param, const char
OBPlugin [virtual]
*ID=NULL)
Do(OBBase *pOb, OpMap *pOptions=NULL, const char
OpTransform [virtual]
*OptionText=NULL)
[inline,
DoOps(OBBase *pOb, OpMap *pOptions) OBOp
static]
[inline,
End(const char *PluginID) OBPlugin
static]
FirstLine(const char *txt) OBPlugin [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
List(const char *PluginID, const char *param=NULL, std::ostream
OBPlugin [static]
*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)
[inline,
MakeInstance(const std::vector< std::string > &textlines) OpTransform
virtual]
OpMap typedef OBOp
[inline,
OpOptions(OBBase *pOb) OBOp
static]
OpTransform(const char *ID, const char *filename, const char
OpTransform [inline]
*descr)
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
[inline,
TypeID() OBOp
virtual]

OpTransform Member List 985


Open Babel: API Documentation

[inline,
WorksWith(OBBase *pOb) const OpTransform
virtual]
[inline,
~OBPlugin() OBPlugin
virtual]
~OpTransform() OpTransform [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::OpTransform

OpTransform Member List 986


OpTransform Class Reference
Applies molecular transforms (OBChemTsfm class) read from a datafile. More...

#include <openbabel/optransform.h>

Inheritance diagram for OpTransform:

[legend]

List of all members.

Public Types
typedef const std::map
< std::string, std::string > OpMap
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


OpTransform (const char *ID, const char *filename, const char *descr)
~OpTransform ()
virtual const char * Description ()
virtual bool WorksWith (OBBase *pOb) const
virtual bool Do (OBBase *pOb, OpMap *pOptions=NULL, const char
*OptionText=NULL)
virtual OpTransform * MakeInstance (const std::vector< std::string > &textlines)
virtual const char * TypeID ()
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

OpTransform Class Reference 987


Open Babel: API Documentation

Static Public Member Functions


static std::string OpOptions (OBBase *pOb)
static bool DoOps (OBBase *pOb, OpMap *pOptions)
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 PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
const char * _id

Detailed Description
Applies molecular transforms (OBChemTsfm class) read from a datafile.

Since:
version 2.2

Member Typedef Documentation

typedef const std::map<std::string, std::string> OpMap [inherited]

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

OpTransform ( const char * ID,


const char * filename,

Static Public Member Functions 988


Open Babel: API Documentation

const char * descr


) [inline]
constructor. Each instance provides an ID, a datafile and a description.

Referenced by OpTransform::MakeInstance().

~OpTransform ( ) [inline]

Member Function Documentation

virtual const char* Description ( ) [virtual]


Required description of a sub-type.

Reimplemented from OBPlugin.

const [inline,
virtual bool WorksWith ( OBBase * pOb )
virtual]
Checks that this op is being applied to the right kind of object(OBMol).

Implements OBOp.

virtual bool Do ( OBBase * pOb,


OpMap * pOptions = NULL,
const char * OptionText = NULL
) [virtual]
Carries out the transform.

Implements OBOp.

virtual OpTransform* MakeInstance ( const std::vector< std::string > & ) [inline, virtual]
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 from OBPlugin.

virtual const char* TypeID ( ) [inline, virtual, inherited]


Provides the name of this kind of plugin. Use -L "ops" to list from commandline.

static std::string OpOptions ( OBBase * pOb ) [inline, static, inherited]

Constructor & Destructor Documentation 989


Open Babel: API Documentation

Returns:
string describing options, for display with -H and to make checkboxes in GUI

Referenced by OBMol::ClassDescription().

static bool DoOps ( OBBase * pOb,


OpMap * pOptions
[inline, static,
)
inherited]
Call Do() of all the OBOps whose ID is a key in the map. Called from Transform(). The map has general
options like -x or --multicharoption The key is the option name and the value, if any, is text which follows the
option name. In some cases, there may be several parameters, space separated)

Returns:
false indicating object should not be output, if any Do() returns false

Referenced by OBMol::DoTransformations().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]
Write information on a plugin class to the string txt. Return false if not written. The default implementation
outputs: the ID, a tab character, and the first line of the Description. The param string can be used in derived
types to provide different outputs.

Reimplemented in OBDescriptor, and OBFormat.

Referenced by OBDescriptor::Display().

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().

Member Function Documentation 990


Open Babel: API Documentation

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.

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().

Member Function Documentation 991


Open Babel: API Documentation

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 Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following file:

• optransform.h

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

Member Data Documentation 992


Open Babel: API Documentation

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 993


SpaceGroup Member List
This is the complete list of members for SpaceGroup, including all inherited members.

AddTransform(const std::string &s) SpaceGroup


BeginTransform(transform3dIterator &i) const SpaceGroup
Find(SpaceGroup *group) SpaceGroup [static]
GetHallName() const SpaceGroup [inline]
GetHMName() const SpaceGroup [inline]
GetId() const SpaceGroup [inline]
GetSpaceGroup(char const *name) SpaceGroup [static]
GetSpaceGroup(const std::string &name) SpaceGroup [static]
GetSpaceGroup(unsigned id) SpaceGroup [static]
IsValid() const SpaceGroup
NextTransform(transform3dIterator &i) const SpaceGroup
operator!=(const SpaceGroup &other) const SpaceGroup [inline]
operator==(const SpaceGroup &) const SpaceGroup
RegisterSpaceGroup(int nb=0,...) SpaceGroup
SetHallName(const char *name) SpaceGroup [inline]
SetHallName(const std::string &name) SpaceGroup [inline]
SetHMName(const char *name) SpaceGroup [inline]
SetHMName(const std::string &name) SpaceGroup [inline]
SetId(unsigned n) SpaceGroup [inline]
SpaceGroup() SpaceGroup
Transform(const vector3 &v) const SpaceGroup
~SpaceGroup() SpaceGroup

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

SpaceGroup Member List 994


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

OpenBabel::SpaceGroup

SpaceGroup Member List 995


SpaceGroup Class Reference
Handle crystallographic space group symmetry. More...

#include <openbabel/math/spacegroup.h>

List of all members.

Public Member Functions


SpaceGroup ()
~SpaceGroup ()
void SetHMName (const char *name)
void SetHMName (const std::string &name)
void SetHallName (const char *name)
void SetHallName (const std::string &name)
void SetId (unsigned n)
void AddTransform (const std::string &s)
const std::string & GetHMName () const
const std::string & GetHallName () const
unsigned GetId () const
std::list< vector3 > Transform (const vector3 &v) const
transform3d const * BeginTransform (transform3dIterator &i) const
transform3d const * NextTransform (transform3dIterator &i) const
void RegisterSpaceGroup (int nb=0,...)
bool operator== (const SpaceGroup &) const
int operator!= (const SpaceGroup &other) const
bool IsValid () const

Static Public Member Functions


static const SpaceGroup * GetSpaceGroup (char const *name)
static const SpaceGroup * GetSpaceGroup (const std::string &name)
static const SpaceGroup * GetSpaceGroup (unsigned id)
static const SpaceGroup * Find (SpaceGroup *group)

Detailed Description
Handle crystallographic space group symmetry.

Since:
version 2.2

See also:
transform3d

SpaceGroup Class Reference 996


Open Babel: API Documentation

Constructor & Destructor Documentation

SpaceGroup ( )

~SpaceGroup ( )

Member Function Documentation

void SetHMName ( const char * name ) [inline]

void SetHMName ( const std::string & name ) [inline]

void SetHallName ( const char * name ) [inline]

void SetHallName ( const std::string & name ) [inline]

void SetId ( unsigned n ) [inline]

const
void AddTransform ( std::string s )
&

const std::string& GetHMName ( ) const [inline]

const
const std::string& GetHallName ( )
[inline]

unsigned GetId ( ) const [inline]

Referenced by OBUnitCell::GetLatticeType(), and OBUnitCell::GetSpaceGroupNumber().

list< vector3 > Transform ( const vector3 & v ) const

Referenced by OBUnitCell::FillUnitCell().

Constructor & Destructor Documentation 997


Open Babel: API Documentation

transform3d const * BeginTransform ( transform3dIterator & i ) const

transform3d const * NextTransform ( transform3dIterator & i ) const

char
const SpaceGroup * GetSpaceGroup ( const name ) [static]
*

Referenced by OBUnitCell::SetSpaceGroup().

const SpaceGroup * GetSpaceGroup ( const std::string & name ) [static]

const SpaceGroup * GetSpaceGroup ( unsigned id ) [static]

const SpaceGroup * Find ( SpaceGroup * group ) [static]

nb =
void RegisterSpaceGroup ( int
0,
...
)

bool operator== ( const SpaceGroup & sg ) const

int operator!= ( const SpaceGroup & other ) const [inline]

bool IsValid ( ) const

Referenced by SpaceGroup::Find().

The documentation for this class was generated from the following files:

• spacegroup.h
• spacegroup.cpp

Member Function Documentation 998


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:58 2008 by 1.5.6.

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

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

Member Function Documentation 999


XMLBaseFormat Member List
This is the complete list of members for XMLBaseFormat, including all inherited members.

_embedlevel XMLBaseFormat [protected]


_id OBPlugin [protected]
_prefix XMLBaseFormat [protected]
_pxmlConv XMLBaseFormat [protected]
[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
baseindent XMLBaseFormat [protected]
[inline,
Begin(const char *PluginID) OBPlugin
static]
Description()=0 OBFormat [pure virtual]
Display(std::string &txt, const char *param, const char
OBFormat [virtual]
*ID=NULL)
[inline,
DoElement(const std::string &ElName) XMLBaseFormat
virtual]
[inline,
End(const char *PluginID) OBPlugin
static]
[inline,
EndElement(const std::string &ElName) XMLBaseFormat
virtual]
[inline,
EndTag() XMLBaseFormat
virtual]
FirstLine(const char *txt) OBPlugin [static]
[inline,
Flags() OBFormat
virtual]
FormatFromMIME(const char *MIME) OBFormat [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetMIMEType() OBFormat [inline]
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
GetType() OBFormat [virtual]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
ind XMLBaseFormat [protected]
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

XMLBaseFormat Member List 1000


Open Babel: API Documentation

[inline,
virtual]
[inline,
MakeNewInstance() OBFormat
virtual]
NamespaceURI() const =0 XMLBaseFormat [pure virtual]
nsdecl XMLBaseFormat [protected]
OBFormat() OBFormat [inline]
[inline,
OutputToStream() XMLBaseFormat
protected]
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
[inline,
ReadChemObject(OBConversion *) OBFormat
virtual]
[inline,
reader() const XMLBaseFormat
protected]
[inline,
ReadMolecule(OBBase *, OBConversion *) OBFormat
virtual]
RegisterFormat(const char *ID, const char *MIME=NULL) OBFormat
[inline,
SkipObjects(int n, OBConversion *pConv) XMLBaseFormat protected,
virtual]
[inline,
SpecificationURL() OBFormat
virtual]
TargetClassDescription() OBFormat [virtual]
TypeID() OBFormat [inline]
[inline,
WriteChemObject(OBConversion *) OBFormat
virtual]
[inline,
WriteMolecule(OBBase *, OBConversion *) OBFormat
virtual]
[inline,
writer() const XMLBaseFormat
protected]
[inline,
~OBPlugin() OBPlugin
virtual]
~XMLBaseFormat() XMLBaseFormat [inline]

XMLBaseFormat Member List 1001


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:58 2008 by 1.5.6.

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

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

OpenBabel::XMLBaseFormat

XMLBaseFormat Member List 1002


XMLBaseFormat Class Reference
Abstract class containing common functionality for XML formats. More...

#include <openbabel/xml.h>

Inheritance diagram for XMLBaseFormat:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


~XMLBaseFormat ()
virtual const char * NamespaceURI () const =0
virtual bool DoElement (const std::string &ElName)
virtual bool EndElement (const std::string &ElName)
virtual const char * EndTag ()
const char * TypeID ()
virtual bool ReadMolecule (OBBase *, OBConversion *)
virtual bool ReadChemObject (OBConversion *)
virtual bool WriteMolecule (OBBase *, OBConversion *)
virtual bool WriteChemObject (OBConversion *)
virtual const char * Description ()=0
virtual const char * TargetClassDescription ()
virtual const std::type_info & GetType ()

XMLBaseFormat Class Reference 1003


Open Babel: API Documentation
virtual const char * SpecificationURL ()
const char * GetMIMEType ()
virtual unsigned int Flags ()
virtual OBFormat * MakeNewInstance ()
int RegisterFormat (const char *ID, const char *MIME=NULL)
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static OBFormat * FormatFromMIME (const char *MIME)
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)

Protected Member Functions


xmlTextReaderPtr reader () const
xmlTextWriterPtr writer () const
void OutputToStream ()
virtual int SkipObjects (int n, OBConversion *pConv)

Static Protected Member Functions


static PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
XMLConversion * _pxmlConv
std::string _prefix
int baseindent
int ind
std::string nsdecl
int _embedlevel
const char * _id

Public Member Functions 1004


Open Babel: API Documentation

Detailed Description
Abstract class containing common functionality for XML formats.

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

~XMLBaseFormat ( ) [inline]

Member Function Documentation

const [pure
virtual const char* NamespaceURI ( )
virtual]

virtual bool DoElement ( const std::string & ElName ) [inline, virtual]

virtual bool EndElement ( const std::string & ElName ) [inline, virtual]

virtual const char* EndTag ( ) [inline, virtual]


The tag at the end of the chemical object e.g. "/molecule>".

Referenced by XMLBaseFormat::SkipObjects().

const [inline,
xmlTextReaderPtr reader ( )
protected]

xmlTextWriterPtr writer ( ) const [inline, protected]

void OutputToStream ( ) [inline, protected]

Detailed Description 1005


Open Babel: API Documentation

virtual int SkipObjects ( int n,


OBConversion * pConv
) [inline, protected, virtual]
Skip past first n objects in input stream (or current one with n=0) Returns 1 on success, -1 on error and 0 if not
implemented

Reimplemented from OBFormat.

const char* TypeID ( ) [inline, inherited]

Referenced by OBFormat::RegisterFormat().

virtual bool ReadMolecule ( OBBase * ,


OBConversion *
[inline, virtual,
)
inherited]
The "API" interface Read function.

Reads a single object. Does not make a new object on the heap; can be used with a pointer to an chem object
on the heap or the stack.

Reimplemented in XMLMoleculeFormat.

Referenced by OBMoleculeFormat::DeferMolOutput(), OBConversion::Read(), and


OBMoleculeFormat::ReadChemObjectImpl().

[inline, virtual,
virtual bool ReadChemObject ( OBConversion * )
inherited]
The "Convert" interface Read function.

Possibly reads multiple new objects on the heap and subjects them to its DoTransformations() function, which
may delete them again. Sends result to pConv->AddChemObject()

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

Referenced by OBConversion::Convert().

virtual bool WriteMolecule ( OBBase * ,


OBConversion *
[inline, virtual,
)
inherited]
The "API" interface Write function.

Member Function Documentation 1006


Open Babel: API Documentation

Writes a single object Does not delete the object; can be used with a pointer to an chem object on the heap or
the stack.

Returns:
false on error.

Referenced by OBMoleculeFormat::OutputDeferredMols(), OBConversion::Write(), and


OBMoleculeFormat::WriteChemObjectImpl().

virtual bool WriteChemObject ( OBConversion * ) [inline, virtual, inherited]


The "Convert" interface Write function.

Writes a single object Deletes the object after writing

Returns:
false on error

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

Referenced by OBConversion::AddChemObject(), and OBConversion::Convert().

virtual const char* Description ( ) [pure virtual, inherited]


Information on this format. Printed out in response to -Hxxx option where xxx id the id of the format.

Must be provided by each format class. Can include a list of command line Options. These may be used to
construction check boxes, radio buttons etc for GUI interface.

Reimplemented from OBPlugin.

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(),


OBMoleculeFormat::OutputDeferredMols(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::RegisterOptionParam(), and OBMoleculeFormat::WriteChemObjectImpl().

const char * TargetClassDescription ( ) [virtual, inherited]


A decription of the chemical object converted by this format.

If not provided, the object type used by the default format is used (usually OBMol).

Referenced by OBConversion::ReportNumberConverted().

const type_info & GetType ( ) [virtual, inherited]

Returns:
the type of chemical object used by the format. Defaults to that used by the default format. Useful for
checking that a format can handle a particular object.

Member Function Documentation 1007


Open Babel: API Documentation

Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.

virtual const char* SpecificationURL ( ) [inline, virtual, inherited]


Web address where the format is defined.

Referenced by OBFormat::Display().

const char* GetMIMEType ( ) [inline, inherited]


Chemical MIME type associated with this file type (if any).

virtual unsigned int Flags ( ) [inline, virtual, inherited]


Decribes the capabilities of the format (Read only etc.).

Currently, can be a bitwise OR of any of the following NOTREADABLE READONEONLY


NOTWRITABLE WRITEONEONLY DEFAULTFORMAT READBINARY WRITEBINARY READXML

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBFormat::Display(),


OBConversion::FullConvert(), OBConversion::GetNextFormat(), OBConversion::InstallStreamFilter(),
OBConversion::OpenAndSetFormat(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::ReadFile(), OBFormat::RegisterFormat(), OBConversion::SetInFormat(),
OBConversion::SetOutFormat(), and OBConversion::WriteFile().

[inline, virtual,
virtual OBFormat* MakeNewInstance ( )
inherited]

Returns:
a pointer to a new instance of the format, or NULL if fails. Normally a single global instance is used
but this may cause problems if there are member variables and the format is used in more than one
place in the program.

int RegisterFormat ( const char * ID,


MIME =
const char *
NULL
) [inherited]

Referenced by OBConversion::RegisterFormat().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]

Member Function Documentation 1008


Open Babel: API Documentation

Provides a description in txt of the format specified by itr. If param starts with "in", read", "out" or "write"
only the appropriate formats are output. The others return false. If param contains "verbose", the whole
description is output.

Reimplemented from OBPlugin.

[static,
OBFormat * FormatFromMIME ( const char * MIME )
inherited]

Referenced by OBConversion::FormatFromMIME().

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.

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().

Member Function Documentation 1009


Open Babel: API Documentation

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.

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().

Member Function Documentation 1010


Open Babel: API Documentation

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 Data Documentation

XMLConversion* _pxmlConv [protected]

Referenced by XMLBaseFormat::OutputToStream(), XMLBaseFormat::reader(),


XMLMoleculeFormat::ReadMolecule(), XMLBaseFormat::SkipObjects(), and XMLBaseFormat::writer().

std::string _prefix [protected]

int baseindent [protected]

int ind [protected]

std::string nsdecl [protected]

int _embedlevel [protected]

Referenced by XMLMoleculeFormat::ReadMolecule().

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following file:

• xml.h

Member Data Documentation 1011


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:58 2008 by 1.5.6.

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

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

Member Data Documentation 1012


XMLConversion Member List
This is the complete list of members for XMLConversion, including all inherited members.

_SkipNextRead XMLConversion
AddChemObject(OBBase *pOb) OBConversion
AddOption(const char *opt, Option_type opttyp=OUTOPTIONS,
OBConversion
const 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
GetAttribute(const char *attrname) XMLConversion
GetAuxConv() const OBConversion [inline]
GetChemObject() OBConversion
GetContent() XMLConversion
GetContentDouble(double &value) XMLConversion
GetContentInt(int &value) XMLConversion
[inline,
GetDefaultFormat() OBConversion
static]
[inline,
GetDefaultXMLClass() XMLConversion
static]
GetDerived(OBConversion *pConv, bool ForReading=true) XMLConversion [static]
GetInFilename() const OBConversion [inline]
GetInFormat() const OBConversion [inline]
GetInLen() const OBConversion [inline]

XMLConversion Member List 1013


Open Babel: API Documentation

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() XMLConversion [inline]
OpenBabel::OBConversion::GetOutputIndex() const OBConversion
GetOutStream() const OBConversion [inline]
GetReader() const XMLConversion [inline]
GetSupportedInputFormat() OBConversion
GetSupportedOutputFormat() OBConversion
GetTitle() const OBConversion
GetWriter() const XMLConversion [inline]
[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() XMLConversion [inline]
IsLastFile() OBConversion [inline]
IsOption(const char *opt, Option_type opttyp=OUTOPTIONS) OBConversion
LErdbuf typedef OBConversion [protected]
[protected,
LoadFormatFiles() OBConversion
static]
LookForNamespace() XMLConversion [inline]
m_IsFirstInput OBConversion [protected]
m_IsLast OBConversion [protected]
MoreFilesToCome OBConversion [protected]
[inline,
Namespaces() XMLConversion
static]
NeedToFreeInStream OBConversion [protected]
NeedToFreeOutStream OBConversion [protected]
NsMapType typedef XMLConversion
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]

XMLConversion Member List 1014


Open Babel: API Documentation

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
OutputToStream() XMLConversion [inline]
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]
Read(OBBase *pOb, std::istream *pin=NULL) OBConversion
ReadFile(OBBase *pOb, std::string filePath) OBConversion
ReadStream(void *context, char *buffer, int len) XMLConversion [static]
ReadString(OBBase *pOb, std::string input) OBConversion
ReadXML(XMLBaseFormat *pFormat, OBBase *pOb) XMLConversion
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)
RegisterXMLFormat(XMLBaseFormat *pFormat, bool
XMLConversion [static]
IsDefault=false, const char *uri=NULL)
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

XMLConversion Member List 1015


Open Babel: API Documentation

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]
SetupReader() XMLConversion
SetupWriter() XMLConversion
SkipXML(const char *ctag) XMLConversion
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
WriteStream(void *context, const char *buffer, int len) XMLConversion [static]
WriteString(OBBase *pOb, bool trimWhitespace=false) OBConversion
XMLConversion(OBConversion *pConv) XMLConversion
~OBConversion() OBConversion [virtual]
~XMLConversion() XMLConversion

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

XMLConversion Member List 1016


Open Babel: API Documentation

• Class Hierarchy
• Class Members

OpenBabel::XMLConversion

XMLConversion Member List 1017


XMLConversion Class Reference
A subclass for conversion of XML formats. More...

#include <openbabel/xml.h>

Inheritance diagram for XMLConversion:

[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 ()

XMLConversion Class Reference 1018


Open Babel: API Documentation

Public Types
typedef std::map< std::string,
XMLBaseFormat * > NsMapType

Public Member Functions


XMLConversion (OBConversion *pConv)
~XMLConversion ()
bool SetupReader ()
bool SetupWriter ()
bool ReadXML (XMLBaseFormat *pFormat, OBBase *pOb)
int SkipXML (const char *ctag)
bool IsLast ()
int GetOutputIndex ()
xmlTextReaderPtr GetReader () const
xmlTextWriterPtr GetWriter () const
void OutputToStream ()
void LookForNamespace ()
std::string GetAttribute (const char *attrname)
std::string GetContent ()
bool GetContentInt (int &value)
bool GetContentDouble (double &value)
void CopyOptions (OBConversion *pSourceConv, Option_type typ=ALL)
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 ()

Convenience functions 1019


Open Babel: API Documentation
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 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 ()

Static Public Member Functions


static NsMapType & Namespaces ()
static void RegisterXMLFormat (XMLBaseFormat *pFormat, bool IsDefault=false, const
char *uri=NULL)
static XMLConversion * GetDerived (OBConversion *pConv, bool ForReading=true)
static XMLBaseFormat * GetDefaultXMLClass ()
static int ReadStream (void *context, char *buffer, int len)
static int WriteStream (void *context, const char *buffer, int len)
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 ()

Public Attributes
bool _SkipNextRead

Protected Types
typedef std::map< std::string,
int > OPAMapType
typedef
FilteringInputStreambuf
< LineEndingExtractor > LErdbuf

Public Member Functions 1020


Open Babel: API Documentation

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
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

Protected Member Functions 1021


Open Babel: API Documentation

Detailed Description
A subclass for conversion of XML formats.

An extended OBConversion class which includes a libxml2 reader for use with XML formats. Copies an
OBConversion and then extends it with a XML parser. Instances made on the heap are deleted when the
original OBConversion object is.

This class is not intended to be used externally -- instead use OBConversion which will find both XML and
non-XML OBFormats.

Instead, this subclass also has support for handling specific needs in XML formats. For example, an XML file
may include multiple namespaces, and the conversion should call appropriate XMLBaseFormat formats as
needed.

Member Typedef Documentation

typedef std::map<std::string, XMLBaseFormat*> NsMapType

typedef std::map<std::string,int> OPAMapType [protected, inherited]

typedef FilteringInputStreambuf< LineEndingExtractor > LErdbuf [protected, inherited]

Member Enumeration Documentation

enum Option_type [inherited]


Three types of options set on the the command line by -a? , -x? , or -?

Enumerator:
INOPTIONS
OUTOPTIONS
GENOPTIONS
ALL

Constructor & Destructor Documentation

XMLConversion ( OBConversion * pConv )


Existing OBConversion instance copied.

~XMLConversion ( )
Frees reader and writer if necessary.

Detailed Description 1022


Open Babel: API Documentation

Member Function Documentation

bool SetupReader ( )
opens libxml2 reader

bool SetupWriter ( )
opens libxml2 writer

bool ReadXML ( XMLBaseFormat * pFormat,


OBBase * pOb
)
Parses the input xml stream and sends each element to the format's callback routines.

Referenced by XMLMoleculeFormat::ReadMolecule().

int SkipXML ( const char * ctag )


Read and discard XML text up to the next occurrence of the tag e.g."/molecule>" This is left as the current
node. Returns 1 on success, 0 if not found, -1 if failed.

Referenced by XMLBaseFormat::SkipObjects().

static NsMapType& Namespaces ( ) [inline, static]


This static function returns a reference to the map Avoids "static initialization order fiasco"

static void RegisterXMLFormat ( XMLBaseFormat * pFormat,


bool IsDefault = false,
const char * uri = NULL
) [static]

static XMLConversion* GetDerived ( OBConversion * pConv,


bool ForReading = true
) [static]
Returns the extended OBConversion class, making it if necessary.

Referenced by XMLMoleculeFormat::ReadMolecule(), and XMLBaseFormat::SkipObjects().

bool IsLast ( ) [inline]

Constructor & Destructor Documentation 1023


Open Babel: API Documentation

Because OBConversion::Convert is still using the unextended OBConversion object we need to obtain the
conversion paramters from it when requested

Reimplemented from OBConversion.

int GetOutputIndex ( ) [inline]

const
xmlTextReaderPtr GetReader ( )
[inline]

Referenced by XMLBaseFormat::reader().

const
xmlTextWriterPtr GetWriter ( )
[inline]

Referenced by XMLBaseFormat::writer().

void OutputToStream ( ) [inline]

Referenced by XMLBaseFormat::OutputToStream().

static XMLBaseFormat* GetDefaultXMLClass ( ) [inline, static]

void LookForNamespace ( ) [inline]

static int ReadStream ( void * context,


char * buffer,
int len
) [static]
Static callback functions for xmlReaderForIO().

static int WriteStream ( void * context,


const char * buffer,
int len
) [static]

std::string GetAttribute ( const char * attrname )

Member Function Documentation 1024


Open Babel: API Documentation

std::string GetContent ( )
Sets value to element content. Returns false if there is no content.

bool GetContentInt ( int & value )


Sets value to element content as an integer. Returns false if there is no content.

double
bool GetContentDouble ( value )
&
Sets value to element content as an double. Returns false if there is no content.

int RegisterFormat ( const char * ID,


OBFormat * pFormat,
const char * MIME = NULL
[static,
)
inherited]
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.

[static,
OBFormat * FindFormat ( const char * ID )
inherited]
Searches registered formats.

Referenced by OBConversion::FormatFromExt(), OBConversion::SetInFormat(), and


OBConversion::SetOutFormat().

[static,
OBFormat * FormatFromExt ( const char * filename )
inherited]
Searches registered formats for an ID the same as the file extension.

Referenced by OBConversion::OpenAndSetFormat().

[static,
OBFormat * FormatFromMIME ( const char * MIME )
inherited]
Searches registered formats for a MIME the same as the chemical MIME type passed.

bool GetNextFormat ( Formatpos & itr,

Member Function Documentation 1025


Open Babel: API Documentation

const char *& str,


OBFormat *& pFormat
) [static, inherited]
Deprecated!.Repeatedly called to recover available Formats.

const char * Description ( ) [static, inherited]

std::istream* GetInStream ( ) const [inline, inherited]

Referenced by OBMoleculeFormat::DeferMolOutput(), and OBMoleculeFormat::ReadChemObjectImpl().

std::ostream* GetOutStream ( ) const [inline, inherited]

void SetInStream ( std::istream * pIn ) [inline, inherited]

Referenced by OBConversion::FullConvert().

[inline,
void SetOutStream ( std::ostream * pOut )
inherited]

Referenced by OBConversion::FullConvert().

bool SetInAndOutFormats ( const char * inID,


const char * outID
) [inherited]
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

OBFormat
bool SetInAndOutFormats ( pIn,
*
OBFormat
pOut
*
) [inherited]

bool SetInFormat ( const char * inID ) [inherited]


Sets the input format from an id e.g. CML.

Member Function Documentation 1026


Open Babel: API Documentation

Referenced by OBMoleculeFormat::ReadNameIndex(), and OBConversion::SetInAndOutFormats().

bool SetInFormat ( OBFormat * pIn ) [inherited]

bool SetOutFormat ( const char * outID ) [inherited]


Sets the output format from an id e.g. CML.

Referenced by OBConversion::SetInAndOutFormats().

bool SetOutFormat ( OBFormat * pOut ) [inherited]

OBFormat* GetInFormat ( ) const [inline, inherited]

OBFormat* GetOutFormat ( ) const [inline, inherited]

Referenced by OBMoleculeFormat::OutputDeferredMols().

std::string GetInFilename ( ) const [inline, inherited]

const [inline,
std::streampos GetInPos ( )
inherited]
Get the position in the input stream of the object being read.

size_t GetInLen ( ) const [inline, inherited]


Get the length in the input stream of the object being read.

const char * GetTitle ( ) const [inherited]

Returns:
a default title which is the filename

const [inline,
OBConversion* GetAuxConv ( )
inherited]
Extension method: deleted in ~OBConversion().

[inline,
void SetAuxConv ( OBConversion * pConv )
inherited]

Member Function Documentation 1027


Open Babel: API Documentation

const char * IsOption ( const char * opt,


Option_type opttyp = OUTOPTIONS
) [inherited]
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().

[inline,
const std::map<std::string,std::string>* GetOptions ( Option_type opttyp )
inherited]
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
) [inherited]
Set an option of specified type, with optional text.

bool RemoveOption ( const char * opt,


Option_type optype
) [inherited]

void SetOptions ( const char * options,


Option_type opttyp
) [inherited]
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, inherited]
For example -h takes 0 parameters; -f takes 1. Call in a format constructor.

Referenced by OBConversion::OBConversion(), and OBMoleculeFormat::OBMoleculeFormat().

Member Function Documentation 1028


Open Babel: API Documentation

int GetOptionParams ( std::string name,


Option_type typ
) [static, inherited]

Returns:
the number of parameters registered for the option, or 0 if not found

void CopyOptions ( OBConversion * pSourceConv,


Option_type typ = ALL
) [inherited]
Copies the options (by default of all types) from one OBConversion Object to another.

std::vector< std::string > GetSupportedInputFormat ( ) [inherited]


Returns the list of supported input format

std::vector< std::string > GetSupportedOutputFormat ( ) [inherited]


Returns the list of supported output format

int Convert ( std::istream * is,


std::ostream * os
) [inherited]
Conversion for single input and output stream.

int Convert ( ) [inherited]


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().

Member Function Documentation 1029


Open Babel: API Documentation

std::vector<
int FullConvert ( FileList,
std::string > &
std::string & OutputFileName,
std::vector<
OutputFileList
std::string > &
) [inherited]
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.

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 ) [inherited]


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().

Member Function Documentation 1030


Open Babel: API Documentation

OBBase * GetChemObject ( ) [inherited]


Retrieve from internal array during output.

Retrieves an object stored by AddChemObject() during output

Referenced by OBMoleculeFormat::WriteChemObjectImpl().

bool IsFirstInput ( ) [inherited]


True if the first input object is being processed.

Referenced by OBMoleculeFormat::DeferMolOutput(), and OBMoleculeFormat::ReadChemObjectImpl().

void SetFirstInput ( bool b = true ) [inherited]


Setwhether or not is the first input.

Referenced by OBConversion::Convert(), and OBConversion::FullConvert().

int GetOutputIndex ( ) const [inherited]


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 ) [inherited]


Sets ouput index (maybe to control whether seen as first object).

Referenced by OBConversion::FullConvert(), OBMoleculeFormat::OutputDeferredMols(), and


OBMoleculeFormat::WriteChemObjectImpl().

void SetMoreFilesToCome ( ) [inherited]


Used with multiple input files. Off by default.

Referenced by OBConversion::FullConvert().

void SetOneObjectOnly ( bool b = true ) [inherited]


Used with multiple input files. Off by default.

Referenced by OBConversion::FullConvert(), OBMoleculeFormat::OutputDeferredMols(), and


OBConversion::Write().

Member Function Documentation 1031


Open Babel: API Documentation

void SetLast ( bool b ) [inline, inherited]


Synonym for SetOneObjectOnly().

bool IsLastFile ( ) [inline, inherited]


True if no more files to be read.

static OBFormat* GetDefaultFormat ( ) [inline, static, inherited]


The default format is set in a single OBFormat class (generally it is OBMol).

bool Write ( OBBase * pOb,


pout =
std::ostream *
NULL
) [inherited]
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,


bool trimWhitespace = false
) [inherited]
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
) [inherited]
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

Member Function Documentation 1032


Open Babel: API Documentation

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 ( ) [inherited]


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

bool Read ( OBBase * pOb,


std::istream * pin = NULL
) [inherited]
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
) [inherited]
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
) [inherited]
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.

Member Function Documentation 1033


Open Babel: API Documentation

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
) [inherited]
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
call to Convert()

Returns:
false if unsucessful.

void ReportNumberConverted ( int count,


pFormat =
OBFormat *
NULL
) [inherited]
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, inherited]
Replaces * in BaseName by InFile without extension and path.

Referenced by OBConversion::FullConvert().

string IncrementedFileName ( std::string & BaseName,


const int Count
) [static, protected, inherited]
Replaces * in BaseName by Count.

Referenced by OBConversion::FullConvert().

bool CheckForUnintendedBatch ( const std::string & infile,


const std::string & outfile
[static, protected,
)
inherited]
Checks for misunderstandings when using the -m option.

Member Function Documentation 1034


Open Babel: API Documentation

Referenced by OBConversion::FullConvert().

void InstallStreamFilter ( ) [protected, inherited]


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, inherited]

Referenced by OBConversion::Convert().

OBConversion::OPAMapType & [static, protected,


( Option_type typ )
OptionParamArray inherited]

Referenced by OBConversion::GetOptionParams(), and OBConversion::RegisterOptionParam().

int LoadFormatFiles ( ) [static, protected, inherited]

Referenced by OBConversion::OBConversion().

bool OpenAndSetFormat ( bool SetFormat,


std::ifstream * is
) [protected, inherited]

Referenced by OBConversion::FullConvert().

Member Data Documentation

bool _SkipNextRead

std::string InFilename [protected, inherited]

Referenced by OBConversion::FullConvert(), OBConversion::GetTitle(), OBConversion::OBConversion(),


OBConversion::OpenAndSetFormat(), OBConversion::OpenInAndOutFiles(), and
OBConversion::ReadFile().

std::istream* pInStream [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::InstallStreamFilter(), OBConversion::OBConversion(),

Member Data Documentation 1035


Open Babel: API Documentation

OBConversion::OpenInAndOutFiles(), OBConversion::Read(), OBConversion::ReadFile(),


OBConversion::ReadString(), and OBConversion::~OBConversion().

std::ostream* pOutStream [protected, inherited]

Referenced by OBConversion::CloseOutFile(), OBConversion::Convert(), OBConversion::OBConversion(),


OBConversion::OpenInAndOutFiles(), OBConversion::Write(), OBConversion::WriteFile(),
OBConversion::WriteString(), and OBConversion::~OBConversion().

OBFormat* pDefaultFormat [static, protected, inherited]

OBFormat* pInFormat [protected, inherited]

Referenced by OBConversion::Convert(), OBConversion::FullConvert(),


OBConversion::InstallStreamFilter(), OBConversion::OBConversion(),
OBConversion::OpenAndSetFormat(), OBConversion::Read(), OBConversion::ReadFile(),
OBConversion::SetInFormat(), and OBConversion::SetStartAndEnd().

OBFormat* pOutFormat [protected, inherited]

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, inherited]

Referenced by OBConversion::AddOption(), OBConversion::CopyOptions(), OBConversion::IsOption(),


OBConversion::OBConversion(), OBConversion::RemoveOption(), and OBConversion::SetOptions().

int Index [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::GetChemObject(), OBConversion::GetOutputIndex(), OBConversion::OBConversion(), and
OBConversion::SetOutputIndex().

unsigned int StartNumber [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

Member Data Documentation 1036


Open Babel: API Documentation

unsigned int EndNumber [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

int Count [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBConversion::FullConvert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

bool m_IsFirstInput [protected, inherited]

Referenced by OBConversion::IsFirstInput(), OBConversion::OBConversion(), and


OBConversion::SetFirstInput().

bool m_IsLast [protected, inherited]

Referenced by OBConversion::Convert(), OBConversion::IsLast(), OBConversion::OBConversion(), and


OBConversion::SetOneObjectOnly().

bool MoreFilesToCome [protected, inherited]

Referenced by OBConversion::Convert(), OBConversion::OBConversion(), and


OBConversion::SetMoreFilesToCome().

bool OneObjectOnly [protected, inherited]

Referenced by OBConversion::Convert(), OBConversion::OBConversion(), and


OBConversion::SetOneObjectOnly().

bool ReadyToInput [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

bool CheckedForGzip [protected, inherited]


input stream is gzip-encoded

Referenced by OBConversion::Convert(), OBConversion::FullConvert(), OBConversion::OBConversion(),


and OBConversion::Read().

Member Data Documentation 1037


Open Babel: API Documentation

bool NeedToFreeInStream [protected, inherited]

Referenced by OBConversion::OBConversion(), OBConversion::OpenInAndOutFiles(),


OBConversion::ReadFile(), OBConversion::ReadString(), and OBConversion::~OBConversion().

bool NeedToFreeOutStream [protected, inherited]

Referenced by OBConversion::CloseOutFile(), OBConversion::OBConversion(),


OBConversion::OpenInAndOutFiles(), OBConversion::WriteFile(), and OBConversion::~OBConversion().

LErdbuf* pLineEndBuf [protected, inherited]

Referenced by OBConversion::InstallStreamFilter(), and OBConversion::OBConversion().

int FormatFilesLoaded = 0 [static, protected, inherited]

Referenced by OBConversion::OBConversion().

OBBase* pOb1 [protected, inherited]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::GetChemObject(), and OBConversion::OBConversion().

std::streampos wInpos [protected, inherited]


position in the input stream of the object being written

Referenced by OBConversion::AddChemObject(), and OBConversion::OBConversion().

std::streampos rInpos [protected, inherited]


position in the input stream of the object being read

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

size_t wInlen [protected, inherited]


length in the input stream of the object being written

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

size_t rInlen [protected, inherited]

Member Data Documentation 1038


Open Babel: API Documentation

length in the input stream of the object being read

Referenced by OBConversion::AddChemObject(), and OBConversion::OBConversion().

OBConversion* pAuxConv [protected, inherited]


Way to extend OBConversion.

Referenced by OBConversion::OBConversion(), and OBConversion::~OBConversion().

std::vector<std::string> SupportedInputFormat [protected, inherited]


list of supported input format

std::vector<std::string> SupportedOutputFormat [protected, inherited]


list of supported output format

The documentation for this class was generated from the following file:

• xml.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:58 2008 by 1.5.6.

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

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

Member Data Documentation 1039


XMLMoleculeFormat Member List
This is the complete list of members for XMLMoleculeFormat, including all inherited members.

_embedlevel XMLBaseFormat [protected]


_id OBPlugin [protected]
_pmol XMLMoleculeFormat [protected]
_prefix XMLBaseFormat [protected]
_pxmlConv XMLBaseFormat [protected]
[inline,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin protected,
static]
baseindent XMLBaseFormat [protected]
[inline,
Begin(const char *PluginID) OBPlugin
static]
Description()=0 OBFormat [pure virtual]
Display(std::string &txt, const char *param, const char
OBFormat [virtual]
*ID=NULL)
[inline,
DoElement(const std::string &ElName) XMLBaseFormat
virtual]
[inline,
End(const char *PluginID) OBPlugin
static]
[inline,
EndElement(const std::string &ElName) XMLBaseFormat
virtual]
[inline,
EndTag() XMLBaseFormat
virtual]
FirstLine(const char *txt) OBPlugin [static]
[inline,
Flags() OBFormat
virtual]
FormatFromMIME(const char *MIME) OBFormat [static]
GetID() const OBPlugin [inline]
GetMap() const =0 OBPlugin [pure virtual]
GetMIMEType() OBFormat [inline]
[inline,
GetPlugin(const char *Type, const char *ID) OBPlugin
static]
[inline,
GetType() XMLMoleculeFormat
virtual]
[protected,
GetTypeMap(const char *PluginID) OBPlugin
static]
ind XMLBaseFormat [protected]
List(const char *PluginID, const char *param=NULL,
OBPlugin [static]
std::ostream *os=&std::cout)
ListAsString(const char *PluginID, const char
OBPlugin [static]
*param=NULL)

XMLMoleculeFormat Member List 1040


Open Babel: API Documentation

ListAsVector(const char *PluginID, const char *param,


OBPlugin [static]
std::vector< std::string > &vlist)
[inline,
MakeInstance(const std::vector< std::string > &) OBPlugin
virtual]
[inline,
MakeNewInstance() OBFormat
virtual]
NamespaceURI() const =0 XMLBaseFormat [pure virtual]
nsdecl XMLBaseFormat [protected]
OBFormat() OBFormat [inline]
[inline,
OutputToStream() XMLBaseFormat
protected]
PluginIterator typedef OBPlugin
[inline,
PluginMap() OBPlugin protected,
static]
PluginMapType typedef OBPlugin
[inline,
ReadChemObject(OBConversion *pConv) XMLMoleculeFormat
virtual]
[inline,
reader() const XMLBaseFormat
protected]
[inline,
ReadMolecule(OBBase *pOb, OBConversion *pConv) XMLMoleculeFormat
virtual]
RegisterFormat(const char *ID, const char *MIME=NULL) OBFormat
[inline,
SkipObjects(int n, OBConversion *pConv) XMLBaseFormat protected,
virtual]
[inline,
SpecificationURL() OBFormat
virtual]
TargetClassDescription() OBFormat [virtual]
TypeID() OBFormat [inline]
[inline,
WriteChemObject(OBConversion *pConv) XMLMoleculeFormat
virtual]
[inline,
WriteMolecule(OBBase *, OBConversion *) OBFormat
virtual]
[inline,
writer() const XMLBaseFormat
protected]
[inline,
~OBPlugin() OBPlugin
virtual]
~XMLBaseFormat() XMLBaseFormat [inline]
~XMLMoleculeFormat() XMLMoleculeFormat [inline]

XMLMoleculeFormat Member List 1041


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:58 2008 by 1.5.6.

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

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

OpenBabel::XMLMoleculeFormat

XMLMoleculeFormat Member List 1042


XMLMoleculeFormat Class Reference
Abstract class for XML formats which represent molecules. More...

#include <openbabel/xml.h>

Inheritance diagram for XMLMoleculeFormat:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


~XMLMoleculeFormat ()
virtual bool ReadChemObject (OBConversion *pConv)
virtual bool WriteChemObject (OBConversion *pConv)
virtual bool ReadMolecule (OBBase *pOb, OBConversion *pConv)
const std::type_info & GetType ()
virtual const char * NamespaceURI () const =0
virtual bool DoElement (const std::string &ElName)
virtual bool EndElement (const std::string &ElName)
virtual const char * EndTag ()
const char * TypeID ()
virtual bool WriteMolecule (OBBase *, OBConversion *)
virtual const char * Description ()=0
virtual const char * TargetClassDescription ()
virtual const char * SpecificationURL ()
const char * GetMIMEType ()
virtual unsigned int Flags ()
virtual OBFormat * MakeNewInstance ()

XMLMoleculeFormat Class Reference 1043


Open Babel: API Documentation
int RegisterFormat (const char *ID, const char *MIME=NULL)
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static OBFormat * FormatFromMIME (const char *MIME)
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)

Protected Member Functions


xmlTextReaderPtr reader () const
xmlTextWriterPtr writer () const
void OutputToStream ()
virtual int SkipObjects (int n, OBConversion *pConv)

Static Protected Member Functions


static PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
OBMol * _pmol
XMLConversion * _pxmlConv
std::string _prefix
int baseindent
int ind
std::string nsdecl
int _embedlevel
const char * _id

Detailed Description
Abstract class for XML formats which represent molecules.

Public Member Functions 1044


Open Babel: API Documentation

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Constructor & Destructor Documentation

~XMLMoleculeFormat ( ) [inline]

Member Function Documentation

[inline,
virtual bool ReadChemObject ( OBConversion * )
virtual]
The "Convert" interface Read function.

Possibly reads multiple new objects on the heap and subjects them to its DoTransformations() function, which
may delete them again. Sends result to pConv->AddChemObject()

Reimplemented from OBFormat.

virtual bool WriteChemObject ( OBConversion * ) [inline, virtual]


The "Convert" interface Write function.

Writes a single object Deletes the object after writing

Returns:
false on error

Reimplemented from OBFormat.

virtual bool ReadMolecule ( OBBase * ,


OBConversion *
) [inline, virtual]
The "API" interface Read function.

Reads a single object. Does not make a new object on the heap; can be used with a pointer to an chem object
on the heap or the stack.

Reimplemented from OBFormat.

Member Typedef Documentation 1045


Open Babel: API Documentation

[inline,
const std::type_info& GetType ( void )
virtual]

Returns:
the type of chemical object used by the format. Defaults to that used by the default format. Useful for
checking that a format can handle a particular object.

Reimplemented from OBFormat.

virtual const char* NamespaceURI ( ) const [pure virtual, inherited]

virtual bool DoElement ( const std::string & ElName ) [inline, virtual, inherited]

virtual bool EndElement ( const std::string & ElName ) [inline, virtual, inherited]

virtual const char* EndTag ( ) [inline, virtual, inherited]


The tag at the end of the chemical object e.g. "/molecule>".

Referenced by XMLBaseFormat::SkipObjects().

xmlTextReaderPtr reader ( ) const [inline, protected, inherited]

const [inline, protected,


xmlTextWriterPtr writer ( )
inherited]

void OutputToStream ( ) [inline, protected, inherited]

virtual int SkipObjects ( int n,


OBConversion * pConv
[inline, protected, virtual,
)
inherited]
Skip past first n objects in input stream (or current one with n=0) Returns 1 on success, -1 on error and 0 if not
implemented

Reimplemented from OBFormat.

const char* TypeID ( ) [inline, inherited]

Referenced by OBFormat::RegisterFormat().

Member Function Documentation 1046


Open Babel: API Documentation

virtual bool WriteMolecule ( OBBase * ,


OBConversion *
[inline, virtual,
)
inherited]
The "API" interface Write function.

Writes a single object Does not delete the object; can be used with a pointer to an chem object on the heap or
the stack.

Returns:
false on error.

Referenced by OBMoleculeFormat::OutputDeferredMols(), OBConversion::Write(), and


OBMoleculeFormat::WriteChemObjectImpl().

virtual const char* Description ( ) [pure virtual, inherited]


Information on this format. Printed out in response to -Hxxx option where xxx id the id of the format.

Must be provided by each format class. Can include a list of command line Options. These may be used to
construction check boxes, radio buttons etc for GUI interface.

Reimplemented from OBPlugin.

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(),


OBMoleculeFormat::OutputDeferredMols(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::RegisterOptionParam(), and OBMoleculeFormat::WriteChemObjectImpl().

const char * TargetClassDescription ( ) [virtual, inherited]


A decription of the chemical object converted by this format.

If not provided, the object type used by the default format is used (usually OBMol).

Referenced by OBConversion::ReportNumberConverted().

virtual const char* SpecificationURL ( ) [inline, virtual, inherited]


Web address where the format is defined.

Referenced by OBFormat::Display().

const char* GetMIMEType ( ) [inline, inherited]


Chemical MIME type associated with this file type (if any).

virtual unsigned int Flags ( ) [inline, virtual, inherited]


Decribes the capabilities of the format (Read only etc.).

Member Function Documentation 1047


Open Babel: API Documentation

Currently, can be a bitwise OR of any of the following NOTREADABLE READONEONLY


NOTWRITABLE WRITEONEONLY DEFAULTFORMAT READBINARY WRITEBINARY READXML

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBFormat::Display(),


OBConversion::FullConvert(), OBConversion::GetNextFormat(), OBConversion::InstallStreamFilter(),
OBConversion::OpenAndSetFormat(), OBMoleculeFormat::ReadChemObjectImpl(),
OBConversion::ReadFile(), OBFormat::RegisterFormat(), OBConversion::SetInFormat(),
OBConversion::SetOutFormat(), and OBConversion::WriteFile().

[inline, virtual,
virtual OBFormat* MakeNewInstance ( )
inherited]

Returns:
a pointer to a new instance of the format, or NULL if fails. Normally a single global instance is used
but this may cause problems if there are member variables and the format is used in more than one
place in the program.

int RegisterFormat ( const char * ID,


MIME =
const char *
NULL
) [inherited]

Referenced by OBConversion::RegisterFormat().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual, inherited]
Provides a description in txt of the format specified by itr. If param starts with "in", read", "out" or "write"
only the appropriate formats are output. The others return false. If param contains "verbose", the whole
description is output.

Reimplemented from OBPlugin.

[static,
OBFormat * FormatFromMIME ( const char * MIME )
inherited]

Referenced by OBConversion::FormatFromMIME().

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.

Member Function Documentation 1048


Open Babel: API Documentation

Reimplemented in OBGroupContrib, and OpTransform.

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 1049


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 1050


Open Babel: API Documentation

Member Data Documentation

OBMol* _pmol [protected]

Referenced by XMLMoleculeFormat::ReadMolecule().

XMLConversion* _pxmlConv [protected, inherited]

Referenced by XMLBaseFormat::OutputToStream(), XMLBaseFormat::reader(),


XMLMoleculeFormat::ReadMolecule(), XMLBaseFormat::SkipObjects(), and XMLBaseFormat::writer().

std::string _prefix [protected, inherited]

int baseindent [protected, inherited]

int ind [protected, inherited]

std::string nsdecl [protected, inherited]

int _embedlevel [protected, inherited]

Referenced by XMLMoleculeFormat::ReadMolecule().

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following file:

• xml.h

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

Member Data Documentation 1051


Open Babel: API Documentation

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 1052


matrix3x3 Member List
This is the complete list of members for matrix3x3, including all inherited members.

determinant() const matrix3x3


FillOrth(double alpha, double beta, double gamma, double a, double b, double c) matrix3x3
findEigenvectorsIfSymmetric(vector3 &eigenvals) const matrix3x3
Get(int row, int column) const matrix3x3 [inline]
GetArray(double *m) matrix3x3 [inline]
GetColumn(unsigned int col) const matrix3x3
GetRow(unsigned int row) const matrix3x3
inverse(void) const matrix3x3
isDiagonal(void) const matrix3x3
isOrthogonal(void) const matrix3x3 [inline]
isSymmetric(void) const matrix3x3
isUnitMatrix(void) const matrix3x3
jacobi(unsigned int n, double *a, double *d, double *v) matrix3x3 [static]
matrix3x3(void) matrix3x3 [inline]
matrix3x3(double s) matrix3x3 [inline]
matrix3x3(vector3 row1, vector3 row2, vector3 row3) matrix3x3 [inline]
matrix3x3(double d[3][3]) matrix3x3 [inline]
operator()(int row, int column) const matrix3x3 [inline]
operator()(int row, int column) matrix3x3 [inline]
operator*(const matrix3x3 &, const vector3 &) matrix3x3 [friend]
operator*(const matrix3x3 &, const matrix3x3 &) matrix3x3 [friend]
operator*=(const double &c) matrix3x3 [inline]
operator/=(const double &c) matrix3x3 [inline]
operator<<(std::ostream &, const matrix3x3 &) matrix3x3 [friend]
PlaneReflection(const vector3 &norm) matrix3x3
randomRotation(OBRandom &rnd) matrix3x3
RotAboutAxisByAngle(const vector3 &axis, const double angle) matrix3x3
Set(int row, int column, double v) matrix3x3 [inline]
SetColumn(int column, const vector3 &v) matrix3x3
SetRow(int row, const vector3 &v) matrix3x3
SetupRotMat(double x, double y, double z) matrix3x3
transpose(void) const matrix3x3
~matrix3x3() matrix3x3 [inline]

matrix3x3 Member List 1053


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:58 2008 by 1.5.6.

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

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

OpenBabel::matrix3x3

matrix3x3 Member List 1054


matrix3x3 Class Reference
Represents a real 3x3 matrix. More...

#include <openbabel/math/matrix3x3.h>

Inheritance diagram for matrix3x3:

[legend]

List of all members.

Public Member Functions


matrix3x3 (void)
matrix3x3 (double s)
matrix3x3 (vector3 row1, vector3 row2, vector3 row3)
matrix3x3 (double d[3][3])
~matrix3x3 ()
void GetArray (double *m)
const double & operator() (int row, int column) const
double & operator() (int row, int column)
matrix3x3 inverse (void) const
matrix3x3 transpose (void) const
void randomRotation (OBRandom &rnd)
double determinant () const
bool isSymmetric (void) const
bool isOrthogonal (void) const
bool isDiagonal (void) const
bool isUnitMatrix (void) const
double Get (int row, int column) const
void Set (int row, int column, double v)
void SetColumn (int column, const vector3 &v)
void SetRow (int row, const vector3 &v)
vector3 GetColumn (unsigned int col) const
vector3 GetRow (unsigned int row) const
matrix3x3 & operator*= (const double &c)
matrix3x3 & operator/= (const double &c)
void SetupRotMat (double x, double y, double z)
void PlaneReflection (const vector3 &norm)
void RotAboutAxisByAngle (const vector3 &axis, const double angle)
void FillOrth (double alpha, double beta, double gamma, double a, double b, double c)
matrix3x3 findEigenvectorsIfSymmetric (vector3 &eigenvals) const

matrix3x3 Class Reference 1055


Open Babel: API Documentation

Static Public Member Functions


static void jacobi (unsigned int n, double *a, double *d, double *v)

Friends
vector3 operator* (const matrix3x3 &, const vector3 &)
matrix3x3 operator* (const matrix3x3 &, const matrix3x3 &)
std::ostream & operator<< (std::ostream &, const matrix3x3 &)

Detailed Description
Represents a real 3x3 matrix.

Rotating points in space can be performed by a vector-matrix multiplication. The matrix3x3 class is designed
as a helper to the vector3 class for rotating points in space. The rotation matrix may be initialised by passing
in the array of floating point values, by passing euler angles, or a rotation vector and angle of rotation about
that vector. Once set, the matrix3x3 class can be used to rotate vectors by the overloaded multiplication
operator. The following demonstrates the usage of the matrix3x3 class:

matrix3x3 mat;
mat.SetupRotMat(0.0,180.0,0.0); //rotate theta by 180 degrees
vector3 v = VX;
v *= mat; //apply the rotation

Constructor & Destructor Documentation

matrix3x3 ( void ) [inline]


Constructs the zero-matrix.

matrix3x3 ( double s ) [inline]


Constructs s times the unit matrix.

matrix3x3 ( vector3 row1,


vector3 row2,
vector3 row3
) [inline]
Constructs a matrix from row vectors.

matrix3x3 ( double d[3][3] ) [inline]


Constructs a matrix from a 3x3-array of doubles.

Public Member Functions 1056


Open Babel: API Documentation

The first index represents the row, the second index the column

~matrix3x3 ( ) [inline]
Destructor.

Member Function Documentation

void GetArray ( double * m ) [inline]


Access function.

Writes the matrix into the 1-dimensional array m, row by row. The array must be able to hold 9 doubles,
otherwise your program will segfault.

const double& operator() ( int row,


int column
) const [inline]

Returns:
a constant reference to an element of the matrix. row and column must be between 0 and 2. No check
is done.

double& operator() ( int row,


int column
) [inline]

Returns:
a non-constant reference to an element of the matrix. row and column must be between 0 and 2. No
check is done.

matrix3x3 inverse ( void ) const


Calculates the inverse of a matrix.

This method checks if the absolute value of the determinant is smaller than 1e-6. If so, nothing is done and an
exception is thrown. Otherwise, the inverse matrix is calculated and returned. *this is not changed.

Warning:
If the determinant is close to zero, but not == 0.0, this method may behave in unexpected ways and
return almost random results; details may depend on your particular floating point implementation.
The use of this method is therefore highly discouraged, unless you are certain that the determinant is
in a reasonable range, away from 0.0 (Stefan Kebekus)

matrix3x3 transpose ( void ) const

Constructor & Destructor Documentation 1057


Open Babel: API Documentation

Calculates the transpose of a matrix.

void randomRotation ( OBRandom & rnd )


Generates a matrix for a random rotation.

The axis of the rotation will be uniformly distributed on the unit sphere and the angle will be uniformly
distributed in the interval 0..360 degrees.

double determinant ( void ) const

Returns:
The determinant of the matrix

Referenced by OpenBabel::signed_volume().

bool isSymmetric ( void ) const


Checks if a matrix is symmetric.

Returns:
False if there are indices i,j such that fabs(*this[i][j]-*this[j][i]) > 1e-6. Otherwise, it returns true.

Referenced by matrix3x3::findEigenvectorsIfSymmetric().

const
bool isOrthogonal ( void )
[inline]
Checks if a matrix is orthogonal.

This method checks if a matrix is orthogonal, i.e. if all column vectors are normalized and are mutually
orthogonal. A matrix is orthogonal if, and only if the transformation it describes is orthonormal. An
orthonormal transformation is a transformation that preserves length and angle.

The check is performed using the method isUnitMatrix() to check if

*this * transpose()

is a unit matrix. The criterion is therefore numerically quite tight.

bool isDiagonal ( void ) const

Returns:
if a matrix is diagonal

This method returns true if and only if the matrix is (approximately) a diagonal matrix. The precision used by
this function is 1e-6.

Member Function Documentation 1058


Open Babel: API Documentation

Referenced by matrix3x3::isUnitMatrix().

bool isUnitMatrix ( void ) const

Returns:
if a matrix is the unit matrix

This method returns true if and only if the matrix is (approximately) equal to the identity matrix. The
precision used by this function is 1e-6.

double Get ( int row,


int column
) const [inline]
Access function.

Warning:
row or column are not in the range 0..2, zero is returned !

Deprecated:
use the constant operator() instead

Referenced by vector3::operator*=().

void Set ( int row,


int column,
double v
) [inline]
Access function.

Warning:
if row or column are not in the range 0..2, nothing will happen !

Deprecated:
use the non-constant operator() instead

Referenced by OBUnitCell::GetFractionalMatrix().

void SetColumn ( int column,


const vector3 & v
)
Access function.

Warning:
If column is not in the range 0..2, the vector remains unchanged and an exception is thrown.

Member Function Documentation 1059


Open Babel: API Documentation

Referenced by matrix3x3::PlaneReflection().

void SetRow ( int row,


const vector3 & v
)
Access function.

Warning:
If column is not in the range 0..2, the vector remains unchanged and an exception is thrown.

vector3 GetColumn ( unsigned int col ) const


Access function.

Warning:
If col is not in the range 0..2, an exception is thrown.

vector3 GetRow ( unsigned int row ) const


Access function.

Warning:
If row is not in the range 0..2, an exception is thrown.

matrix3x3& operator*= ( const double & c ) [inline]


Multiplies all entries of the matrix by a scalar c.

matrix3x3& operator/= ( const double & c ) [inline]


Divides all entries of the matrix by a scalar c.

void SetupRotMat ( double x,


double y,
double z
)
Calculate a rotation matrix for rotation about the x, y, and z axes by the angles specified (in degrees).

Referenced by OBBuilder::Connect().

void PlaneReflection ( const vector3 & norm )


Calculates a matrix that represents reflection on a plane.

Replaces *this with a matrix that represents reflection on the plane through 0 which is given by the normal
vector norm.

Member Function Documentation 1060


Open Babel: API Documentation

Warning:
If the vector norm has length zero, this method will generate the 0-matrix. If the length of the axis is
close to zero, but not == 0.0, this method may behave in unexpected ways and return almost random
results; details may depend on your particular floating point implementation. The use of this method
is therefore highly discouraged, unless you are certain that the length is in a reasonable range, away
from 0.0 (Stefan Kebekus)

Deprecated:
This method will probably replaced by a safer algorithm in the future.

Todo:
Replace this method with a more fool-proof version.

Parameters:
norm specifies the normal to the plane

const
void RotAboutAxisByAngle ( vector3 v,
&
const
angle
double
)
Calculates a rotation matrix, rotating around the specified axis by the specified angle (in degrees).

Replaces *this with a matrix that represents rotation about the axis by a an angle.

Warning:
If the vector axis has length zero, this method will generate the 0-matrix. If the length of the axis is
close to zero, but not == 0.0, this method may behave in unexpected ways and return almost random
results; details may depend on your particular floating point implementation. The use of this method
is therefore highly discouraged, unless you are certain that the length is in a reasonable range, away
from 0.0 (Stefan Kebekus)

Deprecated:
This method will probably replaced by a safer algorithm in the future.

Todo:
Replace this method with a more fool-proof version.

Parameters:
v specifies the axis of the rotation
angle angle in degrees (0..360)

Referenced by OBMol::Align(), OBAtom::GetNewBondVector(), matrix3x3::randomRotation(), and


OBAtom::SetHybAndGeom().

void FillOrth ( double alpha,


double beta,

Member Function Documentation 1061


Open Babel: API Documentation

double gamma,
double a,
double b,
double c
)
Calculate an orthogonalisation matrix for a unit cell specified by the parameters alpha, beta, gamma, a, b, c
where alpha, beta, and gamma are the cell angles (in degrees) and a, b, and c are the cell vector lengths Used
by OBUnitCell

Referenced by OBUnitCell::GetOrthoMatrix().

matrix3x3 findEigenvectorsIfSymmetric ( vector3 & eigenvals ) const


Find the eigenvalues and -vectors of a symmetric matrix.

This method employs the static method matrix3x3::jacobi(...) to find the eigenvalues and eigenvectors of a
symmetric matrix. On entry it is checked if the matrix really is symmetric: if isSymmetric() returns 'false', an
OBError is thrown.

Note:
The jacobi algorithm is should work great for all symmetric 3x3 matrices. If you need to find the
eigenvectors of a non-symmetric matrix, you might want to resort to the sophisticated routines of
LAPACK.

Parameters:
eigenvals a reference to a vector3 where the eigenvalues will be stored. The eigenvalues are ordered
so that eigenvals[0] <= eigenvals[1] <= eigenvals[2].

Returns:
an orthogonal matrix whose ith column is an eigenvector for the eigenvalue eigenvals[i]. Here
'orthogonal' means that all eigenvectors have length one and are mutually orthogonal. The ith
eigenvector can thus be conveniently accessed by the GetColumn() method, as in the following
example.
// Calculate eigenvectors and -values
vector3 eigenvals;
matrix3x3 eigenmatrix = somematrix.findEigenvectorsIfSymmetric(eigenvals);

// Print the 2nd eigenvector


cout << eigenmatrix.GetColumn(1) << endl;

With these conventions, a matrix is diagonalized in the following way:

// Diagonalize the matrix


matrix3x3 diagonalMatrix = eigenmatrix.inverse() * somematrix * eigenmatrix;

void jacobi ( unsigned int n,


double * a,
double * d,
double * v

Member Function Documentation 1062


Open Babel: API Documentation

) [static]
Eigenvalue calculation.

This static function computes the eigenvalues and eigenvectors of a SYMMETRIC nxn matrix. This method
is used internally by OpenBabel, but may be useful as a general eigenvalue finder.

The algorithm uses Jacobi transformations. It is described e.g. in Wilkinson, Reinsch "Handbook for
automatic computation, Volume II: Linear Algebra", part II, contribution II/1. The implementation is also
similar to the implementation in this book. This method is adequate to solve the eigenproblem for small
matrices, of size perhaps up to 10x10. For bigger problems, you might want to resort to the sophisticated
routines of LAPACK.

Note:
If you plan to find the eigenvalues of a symmetric 3x3 matrix, you will probably prefer to use the
more convenient method findEigenvectorsIfSymmetric()

Parameters:
n the size of the matrix that should be diagonalized
a array of size n^2 which holds the symmetric matrix whose eigenvectors are to be computed. The
convention is that the entry in row r and column c is addressed as a[n*r+c] where, of course, 0 <= r
< n and 0 <= c < n. There is no check that the matrix is actually symmetric. If it is not, the
behaviour of this function is undefined. On return, the matrix is overwritten with junk.
d pointer to a field of at least n doubles which will be overwritten. On return of this function, the
entries d[0]..d[n-1] will contain the eigenvalues of the matrix.
v an array of size n^2 where the eigenvectors will be stored. On return, the columns of this matrix
will contain the eigenvectors. The eigenvectors are normalized and mutually orthogonal.

Referenced by OBForceField::DistanceGeometry(), matrix3x3::findEigenvectorsIfSymmetric(), and


OpenBabel::qtrfit().

Friends And Related Function Documentation

vector3 operator* ( const matrix3x3 & m,


const vector3 & v
) [friend]
Matrix-vector multiplication.

Calculates the product m*v of the matrix m and the column vector represented by v

const
matrix3x3 operator* ( matrix3x3 A,
&
const
matrix3x3 B
&
) [friend]

Friends And Related Function Documentation 1063


Open Babel: API Documentation

Matrix-matrix multiplication.

std::ostream
std::ostream& operator<< ( co,
&
const
m
matrix3x3 &
) [friend]
Output a text representation of a matrix.

Print a text representation of the matrix in the standardized form: [ a, b, c ]


[ d, e, f ]
[ g, h, i ]
where the letters represent the appropriate entries in the matrix. Uses the standard output format for the
individual entries, separated by ", " for each column, and [ ] indicating each row.

The documentation for this class was generated from the following files:

• matrix3x3.h
• matrix3x3.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

Friends And Related Function Documentation 1064


obLogBuf Member List
This is the complete list of members for obLogBuf, including all inherited members.

sync() obLogBuf [inline, protected]


~obLogBuf() obLogBuf [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:57 2008 by 1.5.6.

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

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

OpenBabel::obLogBuf

obLogBuf Member List 1065


obLogBuf Class Reference
A minimal streambuf derivative to wrap calls to cerr into calls to OBMessageHandler as needed. More...

#include <openbabel/oberror.h>

List of all members.

Public
Member
Functions
virtual ~obLogBuf ()

Protected
Member
Functions
int sync ()

Detailed Description
A minimal streambuf derivative to wrap calls to cerr into calls to OBMessageHandler as needed.

This class is used for internal use, via OBMessageHandler::StartErrorWrap() To use this class, use the global
OBMessageHandler object obErrorLog:

obErrorLog.StartErrorWrap(); // All output to cerr will become OBErrors


cerr << " This is error 1" << endl; // flush output, create a new error
cerr << " Error 2" << endl;
cerr << " Error 3: Done with output wrapping." << endl;
obErrorLog.StopErrorWrap(); // return to default behavior

Constructor & Destructor Documentation

virtual ~obLogBuf ( ) [inline, virtual]


Close the output buffer, flush, and call OBMessageHandler::ThrowError().

Member Function Documentation

int sync ( ) [inline, protected]


Call OBMessageHandler::ThrowError() and flush the buffer.

obLogBuf Class Reference 1066


Open Babel: API Documentation

The documentation for this class was generated from the following file:

• oberror.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 1067


patty Member List
This is the complete list of members for patty, including all inherited members.

assign_rules(std::vector< std::string > &rules) patty


assign_types(OBMol &mol, std::vector< std::string > &atm_typ) patty
assign_types(OBMol &mol, std::vector< int > &atm_typ) patty
debug_off() patty [inline]
debug_on() patty [inline]
Istype(const std::string &type) patty
patty() patty [inline]
patty(char *s) patty [inline]
patty(const std::string &s) patty [inline]
read_rules(const std::string &infile) patty
type_to_int(const std::string &type, bool failOnUndefined=false) patty
~patty() patty [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::patty

patty Member List 1068


patty Class Reference
Programmable Atom Typer. More...

#include <openbabel/patty.h>

List of all members.

Public Member Functions


patty ()
patty (char *s)
patty (const std::string &s)
~patty ()
void debug_on ()
void debug_off ()
void read_rules (const std::string &infile)
void assign_rules (std::vector< std::string > &rules)
void assign_types (OBMol &mol, std::vector< std::string > &atm_typ)
void assign_types (OBMol &mol, std::vector< int > &atm_typ)
int type_to_int (const std::string &type, bool failOnUndefined=false)
int Istype (const std::string &type)

Detailed Description
Programmable Atom Typer.

Deprecated:
This code is currently not used by the Open Babel library. Instead, OBAtomTyper and
OBAromaticTyper are used. Unless there is interest in retaining this independent class, it will be
removed in the future.

Patty stands for programmable atom typer. The patty class was kindly donated by W. Patrick Walters. The
patty class provides a more flexible means for atom typing than the OBAtomTyper. The behavior of patty is
similar to the OBAtomTyper in that rules apply only to the first atom in the SMARTS pattern. The patty class
can read any free format ASCII file which contains SMARTS patterns associated with user defined atom type.
The following is an example of a valid patty rule

O=C hbacceptor

The following is a code sample that demonstrates the use of patty class:

OBMol mol;

string rulefile = "rules.txt";


patty p;
p.read_rules(p);
vector<string> type;

patty Class Reference 1069


Open Babel: API Documentation
p.assign_types(mol,type);
for (int i = 1;i <= mol.NumAtoms();++i)
cout << "atom number " << i << " was given a type " << type[i] << endl;

The array indices in the vector<string> into which the result values are placed match the corresponding atom
numbers. Since atoms are numbered beginning from one, the first element in the vector<string> is empty, and
the values are placed in [1...mol.NumAtoms()].

Constructor & Destructor Documentation

patty ( ) [inline]

patty ( char * s ) [inline]

patty ( const std::string & s ) [inline]

~patty ( ) [inline]

Member Function Documentation

void debug_on ( ) [inline]

void debug_off ( ) [inline]

void read_rules ( const std::string & infile )

void assign_rules ( std::vector< std::string > & rules )

void assign_types ( OBMol & mol,


std::vector< std::string > & atm_typ
)

void assign_types ( OBMol & mol,


std::vector<
atm_typ
int > &
)

Detailed Description 1070


Open Babel: API Documentation

int type_to_int ( const std::string & type,


failOnUndefined =
bool
false
)

Referenced by patty::assign_types().

int Istype ( const std::string & type )


return atom type index, 0 otherwise

return null if the type does not exist, the type position otherwise the first position start at 1

The documentation for this class was generated from the following files:

• patty.h
• patty.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 Function Documentation 1071


quad Member List
This is the complete list of members for quad, including all inherited members.

first quad
first_type typedef quad
fourth quad
fourth_type typedef quad
quad() quad [inline]
quad(const T1 &a, const T2 &b, const T3 &c, const T4 &d) quad [inline]
quad(const quad< U, V, W, X > &q) quad [inline]
second quad
second_type typedef quad
third quad
third_type typedef quad

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

quad Member List 1072


transform3d Member List
This is the complete list of members for transform3d, including all inherited members.

[inline,
AsArray() const vector3
private]
CanBeNormalized() const vector3 [private]
createOrthoVector(vector3 &v) const vector3 [private]
DescribeAsString() const transform3d
DescribeAsValues() const transform3d
determinant() const matrix3x3 [private]
[inline,
distSq(const vector3 &vv) const vector3
private]
FillOrth(double alpha, double beta, double gamma, double a, double b,
matrix3x3 [private]
double c)
findEigenvectorsIfSymmetric(vector3 &eigenvals) const matrix3x3 [private]
[inline,
OpenBabel::Get(int row, int column) const matrix3x3
private]
[inline,
OpenBabel::vector3::Get(double *c) vector3
private]
[inline,
GetArray(double *m) matrix3x3
private]
GetColumn(unsigned int col) const matrix3x3 [private]
GetRow(unsigned int row) const matrix3x3 [private]
inverse(void) const matrix3x3 [private]
IsApprox(const vector3 &other, const double &precision) const vector3 [private]
isDiagonal(void) const matrix3x3 [private]
[inline,
isOrthogonal(void) const matrix3x3
private]
isSymmetric(void) const matrix3x3 [private]
isUnitMatrix(void) const matrix3x3 [private]
[private,
jacobi(unsigned int n, double *a, double *d, double *v) matrix3x3
static]
[inline,
length() const vector3
private]
[inline,
length_2() const vector3
private]
[inline,
matrix3x3(void) matrix3x3
private]
[inline,
matrix3x3(double s) matrix3x3
private]
[inline,
matrix3x3(vector3 row1, vector3 row2, vector3 row3) matrix3x3
private]
matrix3x3(double d[3][3]) matrix3x3

transform3d Member List 1073


Open Babel: API Documentation

[inline,
private]
Normalize() transform3d
normalize() vector3 [private]
[inline,
operator!=(const vector3 &other) const vector3
private]
[inline,
operator()(int row, int column) const matrix3x3
private]
[inline,
operator()(int row, int column) matrix3x3
private]
operator*(const vector3 &) transform3d
operator*(const transform3d &) transform3d
OpenBabel::matrix3x3::operator*(const matrix3x3 &, const vector3 &) matrix3x3 [friend]
OpenBabel::matrix3x3::operator*(const matrix3x3 &, const matrix3x3
matrix3x3 [friend]
&)
[inline,
OpenBabel::operator*=(const double &c) matrix3x3
private]
[inline,
OpenBabel::vector3::operator*=(const double &c) vector3
private]
OpenBabel::vector3::operator*=(const matrix3x3 &) vector3 [private]
[inline,
operator+=(const vector3 &v) vector3
private]
[inline,
operator+=(const double *f) vector3
private]
[inline,
operator-=(const vector3 &v) vector3
private]
[inline,
operator-=(const double *f) vector3
private]
[inline,
OpenBabel::operator/=(const double &c) matrix3x3
private]
[inline,
OpenBabel::vector3::operator/=(const double &c) vector3
private]
operator<<(std::ostream &, const matrix3x3 &) matrix3x3 [friend]
[inline,
operator=(const vector3 &v) vector3
private]
operator==(const vector3 &) const vector3 [private]
operator[](unsigned int i) const vector3 [private]
PlaneReflection(const vector3 &norm) matrix3x3 [private]
randomRotation(OBRandom &rnd) matrix3x3 [private]
randomUnitVector(OBRandom *oeRand=NULL) vector3 [private]
RotAboutAxisByAngle(const vector3 &axis, const double angle) matrix3x3 [private]
[inline,
OpenBabel::Set(int row, int column, double v) matrix3x3
private]
OpenBabel::vector3::Set(const double inX, const double inY, const vector3 [inline,

transform3d Member List 1074


Open Babel: API Documentation

double inZ) private]


[inline,
OpenBabel::vector3::Set(const double *c) vector3
private]
SetColumn(int column, const vector3 &v) matrix3x3 [private]
SetRow(int row, const vector3 &v) matrix3x3 [private]
SetupRotMat(double x, double y, double z) matrix3x3 [private]
[inline,
SetX(const double inX) vector3
private]
[inline,
SetY(const double inY) vector3
private]
[inline,
SetZ(const double inZ) vector3
private]
transform3d(void) transform3d [inline]
transform3d(const matrix3x3 &m, const vector3 &v) transform3d [inline]
transform3d(double s) transform3d [inline]
transform3d(vector3 row1, vector3 row2, vector3 row3, vector3
transform3d [inline]
translation)
transform3d(double d[3][3], double t[3]) transform3d [inline]
transpose(void) const matrix3x3 [private]
vector3(const double inX=0.0, const double inY=0.0, const double [inline,
vector3
inZ=0.0) private]
[inline,
vector3(double inV[3]) vector3
private]
[inline,
vector3(const vector3 &v) vector3
private]
[inline,
x() const vector3
private]
[inline,
x() vector3
private]
[inline,
y() const vector3
private]
[inline,
y() vector3
private]
[inline,
z() const vector3
private]
[inline,
z() vector3
private]
[inline,
~matrix3x3() matrix3x3
private]
[inline,
~vector3() vector3
private]

transform3d Member List 1075


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:58 2008 by 1.5.6.

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

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

OpenBabel::transform3d

transform3d Member List 1076


transform3d Class Reference
Handle 3D transformations, such as space group definitions. More...

#include <openbabel/math/transform3d.h>

Inheritance diagram for transform3d:

[legend]

List of all members.

Public Member Functions


transform3d (void)
transform3d (const matrix3x3 &m, const vector3 &v)
transform3d (double s)
transform3d (vector3 row1, vector3 row2, vector3 row3, vector3 translation)
transform3d (double d[3][3], double t[3])
vector3 operator* (const vector3 &)
transform3d operator* (const transform3d &)
std::string DescribeAsString () const
std::string DescribeAsValues () const
void Normalize ()

Friends
vector3 operator* (const matrix3x3 &, const vector3 &)
matrix3x3 operator* (const matrix3x3 &, const matrix3x3 &)
std::ostream & operator<< (std::ostream &, const matrix3x3 &)

Detailed Description
Handle 3D transformations, such as space group definitions.

Since:
version 2.2

See also:
SpaceGroup

transform3d Class Reference 1077


Open Babel: API Documentation

Constructor & Destructor Documentation

transform3d ( void ) [inline]

Referenced by transform3d::operator*().

transform3d ( const matrix3x3 & m,


const vector3 & v
) [inline]

transform3d ( double s ) [inline]

transform3d ( vector3 row1,


vector3 row2,
vector3 row3,
vector3 translation
) [inline]
Constructs a matrix from row vectors.

transform3d ( double d[3][3],


double t[3]
) [inline]
Constructs a matrix from a 3x3-array of doubles.

The first index represents the row, the second index the column

Member Function Documentation

const
vector3 operator* ( vector3 v )
&

transform3d operator* ( const transform3d & t )

string DescribeAsString ( ) const

Detailed Description 1078


Open Babel: API Documentation

string DescribeAsValues ( ) const

void Normalize ( )

Friends And Related Function Documentation

vector3 operator* ( const matrix3x3 & m,


const vector3 & v
[friend,
)
inherited]
Matrix-vector multiplication.

Calculates the product m*v of the matrix m and the column vector represented by v

matrix3x3 operator* ( const matrix3x3 & A,


const matrix3x3 & B
[friend,
)
inherited]
Matrix-matrix multiplication.

std::ostream& operator<< ( std::ostream & co,


const matrix3x3 & m
) [friend, inherited]
Output a text representation of a matrix.

Print a text representation of the matrix in the standardized form: [ a, b, c ]


[ d, e, f ]
[ g, h, i ]
where the letters represent the appropriate entries in the matrix. Uses the standard output format for the
individual entries, separated by ", " for each column, and [ ] indicating each row.

The documentation for this class was generated from the following files:

• transform3d.h
• transform3d.cpp

Member Function Documentation 1079


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:58 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 1080


triple Member List
This is the complete list of members for triple, including all inherited members.

first triple
first_type typedef triple
second triple
second_type typedef triple
third triple
third_type typedef triple
triple() triple [inline]
triple(const T1 &a, const T2 &b, const T3 &c) triple [inline]
triple(const triple< U, V, W > &t) triple [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

triple Member List 1081


vector3 Member List
This is the complete list of members for vector3, including all inherited members.

AsArray() const vector3 [inline]


CanBeNormalized() const vector3
createOrthoVector(vector3 &v) const vector3
distSq(const vector3 &vv) const vector3 [inline]
Get(double *c) vector3 [inline]
IsApprox(const vector3 &other, const double &precision) const vector3
length() const vector3 [inline]
length_2() const vector3 [inline]
normalize() vector3
operator!=(const vector3 &other) const vector3 [inline]
operator*=(const double &c) vector3 [inline]
operator*=(const matrix3x3 &) vector3
operator+=(const vector3 &v) vector3 [inline]
operator+=(const double *f) vector3 [inline]
operator-=(const vector3 &v) vector3 [inline]
operator-=(const double *f) vector3 [inline]
operator/=(const double &c) vector3 [inline]
operator=(const vector3 &v) vector3 [inline]
operator==(const vector3 &) const vector3
operator[](unsigned int i) const vector3
randomUnitVector(OBRandom *oeRand=NULL) vector3
Set(const double inX, const double inY, const double inZ) vector3 [inline]
Set(const double *c) vector3 [inline]
SetX(const double inX) vector3 [inline]
SetY(const double inY) vector3 [inline]
SetZ(const double inZ) vector3 [inline]
vector3(const double inX=0.0, const double inY=0.0, const double inZ=0.0) vector3 [inline]
vector3(double inV[3]) vector3 [inline]
vector3(const vector3 &v) vector3 [inline]
x() const vector3 [inline]
x() vector3 [inline]
y() const vector3 [inline]
y() vector3 [inline]
z() const vector3 [inline]
z() vector3 [inline]
~vector3() vector3 [inline]

vector3 Member List 1082


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:58 2008 by 1.5.6.

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

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

OpenBabel::vector3

vector3 Member List 1083


vector3 Class Reference
Represents a vector in 3-dimensional real space. More...

#include <openbabel/math/vector3.h>

Inheritance diagram for vector3:

[legend]

List of all members.

Public Member Functions


vector3 (const double inX=0.0, const double inY=0.0, const double inZ=0.0)
vector3 (double inV[3])
vector3 (const vector3 &v)
~vector3 ()
void Set (const double inX, const double inY, const double inZ)
void Set (const double *c)
void SetX (const double inX)
void SetY (const double inY)
void SetZ (const double inZ)
void Get (double *c)
double operator[] (unsigned int i) const
vector3 & operator= (const vector3 &v)
const double * AsArray () const
vector3 & operator+= (const vector3 &v)
vector3 & operator-= (const vector3 &v)
vector3 & operator+= (const double *f)
vector3 & operator-= (const double *f)
vector3 & operator*= (const double &c)
vector3 & operator/= (const double &c)
vector3 & operator*= (const matrix3x3 &)
void randomUnitVector (OBRandom *oeRand=NULL)
vector3 & normalize ()
bool CanBeNormalized () const
double length_2 () const
double length () const
const double & x () const
const double & y () const
const double & z () const
double & x ()

vector3 Class Reference 1084


Open Babel: API Documentation

double & y ()
double & z ()
int operator== (const vector3 &) const
int operator!= (const vector3 &other) const
bool IsApprox (const vector3 &other, const double &precision) const
double distSq (const vector3 &vv) const
bool createOrthoVector (vector3 &v) const

Detailed Description
Represents a vector in 3-dimensional real space.

The vector3 class was designed to simplify operations with floating point coordinates. To this end many of the
common operations have been overloaded for simplicity. Vector addition, subtraction, scalar multiplication,
dot product, cross product, magnitude and a number of other utility functions are built in to the vector class.
For a full description of the class member functions please consult the documentation. The following code
demonstrates several of the functions of the vector class:

vector3 v1,v2,v3;
v1 = VX;
v2 = VY;
v3 = cross(v1,v2);
v3 *= 2.5;
v3.normalize();

Constructor & Destructor Documentation

vector3 ( const double inX = 0.0,


const double inY = 0.0,
const double inZ = 0.0
) [inline]
Constructor.

vector3 ( double inV[3] ) [inline]

vector3 ( const vector3 & v ) [inline]


Copy Constructor.

~vector3 ( ) [inline]
Destructor.

Public Member Functions 1085


Open Babel: API Documentation

Member Function Documentation

void Set ( const double inX,


const double inY,
const double inZ
) [inline]
Set x,y and z-component of a vector.

Referenced by OBRotamerList::AddRotamer(), OBRing::findCenterAndNormal(),


OBFloatGrid::GetMidpointVector(), OBAtom::GetNewBondVector(), OBAtom::GetVector(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
vector3::randomUnitVector(), OBAtom::SetVector(), OBForceField::ValidateConjugateGradients(), and
OBForceField::ValidateSteepestDescent().

const
void Set ( double c ) [inline]
*
Set x,y and z-component of a vector from c[0]..c[2].

void SetX ( const double inX ) [inline]


Access function to get the x-coordinate of the vector.

Referenced by OBForceField::GetGrid(), OBForceField::MolecularDynamicsTakeNSteps(), and


vector3::operator*=().

const
void SetY ( inY ) [inline]
double
Access function to get the y-coordinate of the vector.

Referenced by OBForceField::GetGrid(), OBForceField::MolecularDynamicsTakeNSteps(), and


vector3::operator*=().

const
void SetZ ( inZ ) [inline]
double
Access function to get the z-coordinate of the vector.

Referenced by OpenBabel::CalcSignedVolume(), OBForceField::GetGrid(),


OBForceField::MolecularDynamicsTakeNSteps(), and vector3::operator*=().

void Get ( double * c ) [inline]


Set c[0]..c[2] to the components of the vector.

Member Function Documentation 1086


Open Babel: API Documentation

Warning:
No error checking is performed

Referenced by OBForceField::VectorBondDerivative().

double operator[] ( unsigned int i ) const


Access function to x: [0], y: [1], and z[2].

This (slow) method allows to access the elements of the vector as if it were an array of doubles. If the index is
> 2, then a warning is printed and 0.0 is returned. Otherwise, if i is 0, 1 or 2, then a reference to x, y or z is
returned, respectively.

Warning:
This method is primarily designed to facilitate the integration ('Open Babelization') of code that uses
arrays of doubles rather than the vector class. Due to the error checks the method is of course very
slow and should therefore be avoided in production code.

vector3& operator= ( const vector3 & v ) [inline]


Assignment.

const
const double* AsArray ( )
[inline]

Returns:
the vector as a const double *

vector3& operator+= ( const vector3 & v ) [inline]


Vector addition (add v to *this).

Returns:
*this + v

const
vector3& operator-= ( vector3 v ) [inline]
&
Vector subtraction (subtract v from *this).

Returns:
*this - v

vector3& operator+= ( const double * f ) [inline]


Scalar addition (add f to *this).

Member Function Documentation 1087


Open Babel: API Documentation

Returns:
*this + f

const
vector3& operator-= ( double f ) [inline]
*
Scalar subtraction (subtract f from *this).

Returns:
*this - f

vector3& operator*= ( const double & c ) [inline]


Scalar multiplication (multiply *this by c).

Returns:
*this * c

const
vector3& operator/= ( double c ) [inline]
&
Scalar division (divide *this by c).

Returns:
*this divided by c

vector3 & operator*= ( const matrix3x3 & m )


Multiplication of matrix and vector

Returns:
the result (i.e., the updated vector)

Todo:
Currently unimplemented

calculates the product m*(*this) of the matrix m and the column vector represented by *this

void randomUnitVector ( OBRandom * obRandP = NULL )


Create a random unit vector.

Replaces *this with a random unit vector, which is (supposed to be) uniformly distributed over the unit
sphere. Uses the random number generator obRand, or uses the system number generator with a time seed if
obRand == NULL.

Parameters:
obRandP

Member Function Documentation 1088


Open Babel: API Documentation

random number generator to use, or NULL, if the system random number generator
(with time seed) should be used

Referenced by OBAtom::GetNewBondVector(), matrix3x3::randomRotation(),


OBForceField::VectorBondDerivative(), and OBForceField::VectorLengthDerivative().

vector3 & normalize ( )


Scales a vector to give it length one.

Returns:
the result (i.e., the normalized vector)

This method normalizes *this. In other words, it divides the x,y,z coords of *this by this->length(). If *this
can't be safely normalized, it remains unchanged. See CanBeNormalized().

Returns:
a reference to *this

Referenced by OBRing::findCenterAndNormal(), OBBuilder::GetNewBondVector(),


OBAtom::GetNewBondVector(), OpenBabel::InternalToCartesian(), OBForceField::LineSearch(),
matrix3x3::PlaneReflection(), vector3::randomUnitVector(), matrix3x3::RotAboutAxisByAngle(),
OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBForceField::ValidateLineSearch(), and
OBForceField::VectorAngleDerivative().

bool CanBeNormalized ( ) const

Returns:
Whether a vector can be normalized

This method returns true if *this can be safely normalized. Vectors that can't be safely normalized are:

• the zero vector (0,0,0)


• vectors having coords that can't be squared without triggering an overflow or underflow. This means
doubles having absolute value greater than 1e150 or smaller than 1e-150.

Referenced by vector3::createOrthoVector(), and vector3::normalize().

double length_2 ( ) const [inline]

Returns:
The length of the vector squared

Referenced by OpenBabel::CartesianToInternal(), OBAtom::GetNewBondVector(), vector3::IsApprox(), and


vector3::randomUnitVector().

double length ( ) const [inline]

Member Function Documentation 1089


Open Babel: API Documentation

Returns:
The vector length

Referenced by OpenBabel::CalcTorsionAngle(), OpenBabel::CartesianToInternal(), OBAtom::GetAngle(),


OBUnitCell::GetCellMatrix(), OBUnitCell::GetCellVectors(), OBAtom::GetNewBondVector(),
OBForceField::LineSearch(), vector3::normalize(), OpenBabel::Point2Plane(), OBUnitCell::SetData(),
OpenBabel::vectorAngle(), OBForceField::VectorAngleDerivative(),
OBForceField::VectorLengthDerivative(), OBForceField::VectorOOPDerivative(), and
OBForceField::VectorTorsionDerivative().

const double& x ( ) const [inline]


Access function to get the x-coordinate of the vector.

Referenced by OBMol::AddHydrogens(), SpaceGroup::AddTransform(),


OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(),
OBBuilder::Connect(), OpenBabel::cross(), vector3::distSq(), OpenBabel::dot(), OBGridData::GetAxes(),
OBForceField::GetGrid(), OBAtom::GetNewBondVector(), OBGridData::GetValue(),
matrix3x3::matrix3x3(), OBForceField::MolecularDynamicsTakeNSteps(), transform3d::Normalize(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
OpenBabel::operator*(), vector3::operator*=(), OpenBabel::operator+(), OpenBabel::operator-(),
OpenBabel::operator/(), OpenBabel::operator<<(), vector3::operator==(), matrix3x3::PlaneReflection(),
OBGrid::PointIsInBox(), matrix3x3::RotAboutAxisByAngle(), matrix3x3::SetColumn(),
OBFloatGrid::SetLimits(), matrix3x3::SetRow(), OBAtom::SetVector(),
OBForceField::SteepestDescentTakeNSteps(), SpaceGroup::Transform(), OBMol::Translate(),
OBForceField::ValidateConjugateGradients(), OBForceField::ValidateGradientError(), and
OBForceField::ValidateSteepestDescent().

const double& y ( ) const [inline]


Access function to get the y-coordinate of the vector.

Referenced by OBMol::AddHydrogens(), SpaceGroup::AddTransform(),


OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(),
OBBuilder::Connect(), OpenBabel::cross(), vector3::distSq(), OpenBabel::dot(), OBGridData::GetAxes(),
OBForceField::GetGrid(), OBAtom::GetNewBondVector(), OBGridData::GetValue(),
matrix3x3::matrix3x3(), OBForceField::MolecularDynamicsTakeNSteps(), transform3d::Normalize(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
OpenBabel::operator*(), vector3::operator*=(), OpenBabel::operator+(), OpenBabel::operator-(),
OpenBabel::operator/(), OpenBabel::operator<<(), vector3::operator==(), matrix3x3::PlaneReflection(),
OBGrid::PointIsInBox(), matrix3x3::RotAboutAxisByAngle(), matrix3x3::SetColumn(),
OBFloatGrid::SetLimits(), matrix3x3::SetRow(), OBAtom::SetVector(),
OBForceField::SteepestDescentTakeNSteps(), SpaceGroup::Transform(), OBMol::Translate(),
OBForceField::ValidateConjugateGradients(), OBForceField::ValidateGradientError(), and
OBForceField::ValidateSteepestDescent().

const double& z ( ) const [inline]


Access function to get the z-coordinate of the vector.

Member Function Documentation 1090


Open Babel: API Documentation

Referenced by OBMol::AddHydrogens(), SpaceGroup::AddTransform(),


OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(),
OBBuilder::Connect(), OBMol::ConnectTheDots(), OpenBabel::cross(), vector3::distSq(), OpenBabel::dot(),
OBGridData::GetAxes(), OBForceField::GetGrid(), OBAtom::GetNewBondVector(),
OBGridData::GetValue(), matrix3x3::matrix3x3(), OBForceField::MolecularDynamicsTakeNSteps(),
transform3d::Normalize(), OBForceField::NumericalDerivative(),
OBForceField::NumericalSecondDerivative(), OpenBabel::operator*(), vector3::operator*=(),
OpenBabel::operator+(), OpenBabel::operator-(), OpenBabel::operator/(), OpenBabel::operator<<(),
vector3::operator==(), matrix3x3::PlaneReflection(), OBGrid::PointIsInBox(),
matrix3x3::RotAboutAxisByAngle(), matrix3x3::SetColumn(), OBFloatGrid::SetLimits(),
matrix3x3::SetRow(), OBAtom::SetVector(), OBForceField::SteepestDescentTakeNSteps(),
SpaceGroup::Transform(), OBMol::Translate(), OBForceField::ValidateConjugateGradients(), and
OBForceField::ValidateGradientError().

double& x ( ) [inline]
Access function to set the x-coordinate of the vector.

double& y ( ) [inline]
Access function to set the y-coordinate of the vector.

double& z ( ) [inline]
Access function to set the z-coordinate of the vector.

int operator== ( const vector3 & other ) const


Comparison Methods.

Equivalence of vectors

Deprecated:
This method uses unreliable floating point == comparisons Use vector3::IsApprox() instead.

Returns:
true if every component is equal

int operator!= ( const vector3 & other ) const [inline]

Deprecated:
This method uses unreliable floating point == comparisons Use vector3::IsApprox() instead.

Returns:
true if at least one component of the two vectors is !=

bool IsApprox ( const vector3 & other,

Member Function Documentation 1091


Open Babel: API Documentation

const double & precision


) const
Safe comparison for floating-point vector3.

Returns:
true if the vector *this is approximately equal to the vector other, to the precision precision.
More specifically, this method works exactly like the OpenBabel::IsApprox() function, replacing the
absolute value for doubles by the norm for vectors.

Parameters:
other The vector for comparison
precision This parameter plays the same role as in OpenBabel::IsApprox().

Referenced by OBAtom::GetNewBondVector().

double distSq ( const vector3 & vv ) const [inline]


}@

Returns:
square of the distance between *this and vv

equivalent to length_2(*this-vv)

Referenced by OBForceField::GetGrid(), and vector3::IsApprox().

vector3
bool createOrthoVector ( res ) const
&
Construct a unit vector orthogonal to *this.

Creates a vector of length one, orthogonal to *this.

Returns:
Whether the method was successful

It requires that *this is normalizable; otherwise it just returns false. See CanBeNormalized()

Parameters:
res reference by which to pass the result.

Returns:
always true. (Return value kept for compatibility, as old versions of OpenBabel used to check for
normalizability).

The documentation for this class was generated from the following files:

• vector3.h
• matrix3x3.cpp
• vector3.cpp

Member Function Documentation 1092


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:58 2008 by 1.5.6.

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

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

Member Function Documentation 1093


Class Index
A|B|C|D|F|G|L|M|O|P|Q|S|T|V|X|_

OBAtomBondIter OBFormat OBPointGroup OBSymmetryData


A
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
AliasData OBAtomClassData OBGastChrg OBProxGrid OBTorsion
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
AtomSpec OBAtomTyper OBGenericData OBRandom OBTorsionData
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBBase OBGlobalDataBase OBRateData OBTypeTable
B
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
BondSpec OBBitVec OBGrid OBReaction OBUnitCell
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBBond OBGridData OBResidue OBVectorData
C
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
CharPtrLess OBBondTyper OBGroupContrib OBResidueAtomIterOBVibrationData
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBBuilder OBInternalCoord OBResidueData OBVirtualBond
D
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBChainsParser OBIsotopeTable OBResidueIter OpTransform
DLHandler
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
DoubleType OBChemTsfm OBLocale OBRing
P
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBChiralData obLogBuf OBRingData Pattern
F
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
FastSearch OBCommentData OBMatrixData OBRingSearch
patty (OpenBabel)
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
FastSearchIndexer OBConformerData OBMessageHandler OBRingTyper
Q
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
FilteringInputStreambufOBConversion OBMol OBRotamerList
quad (OpenBabel)
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
FptIndex OBDescriptor OBMolAngleIter OBRotationData
S
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
FptIndexHeader OBElement OBMolAtomBFSIter OBRotor SpaceGroup
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBElementTable OBMolAtomDFSIterOBRotorKeys
G T
(OpenBabel) (OpenBabel) (OpenBabel)
GasteigerState OBError OBMolAtomIter OBRotorList transform3d
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBExternalBond OBMolBondIter OBRotorRule
L triple (OpenBabel)
(OpenBabel) (OpenBabel) (OpenBabel)
LineEndingExtractor OBExternalBondDataOBMoleculeFormat OBRotorRules
V
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
LineSearchType OBFFCalculation2 OBMolPairIter OBRTree vector3
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBFFCalculation3 OBMolRingIter OBScoreGrid
M X
(OpenBabel) (OpenBabel) (OpenBabel)
matrix3x3 OBFFCalculation4 OBMolTorsionIter OBSerialNums XMLBaseFormat
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)

Class Index 1094


Open Babel: API Documentation
OBFFConstraint OBNasaThermoData OBSetData XMLConversion
O
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBAngle OBFFConstraints OBOp OBSmartsPattern XMLMoleculeFormat
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBAngleData OBFFParameter OBPairData OBSqrtTbl
_
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBAromaticTyper OBFingerprint OBPairTemplate OBSSMatch _AtomExpr
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBAtom OBFloatGrid OBPhModel OBStopwatch _BondExpr
(OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel) (OpenBabel)
OBAtomAtomIter OBForceField OBPlugin
(OpenBabel) (OpenBabel) (OpenBabel)
A|B|C|D|F|G|L|M|O|P|Q|S|T|V|X|_

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 Index 1095


data.cpp File Reference
Global data and resource file parsers. More...

#include <openbabel/babelconfig.h>
#include <openbabel/data.h>
#include <openbabel/mol.h>
#include <openbabel/locale.h>
#include "element.h"
#include "types.h"
#include "isotope.h"
#include "resdata.h"

Namespaces
namespace OpenBabel

Functions
int strncasecmp (const char *s1, const char *s2,
size_t n)
void Toupper (string &s)
void Tolower (string &s)

Detailed Description
Global data and resource file parsers.

Function Documentation

int strncasecmp ( const char * s1,


const char * s2,
size_t n
)

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

data.cpp File Reference 1096


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

Function Documentation 1097


data.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 data.h - Global data and resource file parsers.
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_DATA_H
00021 #define OB_DATA_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <stdio.h>
00026
00027 #include <fstream>
00028 #include <vector>
00029 #include <string>
00030 #include <cstring>
00031
00032 namespace OpenBabel
00033 {
00034
00035 class OBAtom;
00036 class OBMol;
00037 class OBBitVec;
00038
00049 class OBAPI OBGlobalDataBase
00050 {
00051 protected:
00052 bool _init;
00053 const char *_dataptr;
00054 std::string _filename;
00055 std::string _dir;
00056 std::string _subdir;
00057 std::string _envvar;
00058
00059 public:
00061 OBGlobalDataBase(): _init(false), _dataptr(NULL) { }
00063 virtual ~OBGlobalDataBase() {}
00065 void Init();
00067 virtual unsigned int GetSize() { return 0;}
00069 void SetReadDirectory(char *dir) { _dir = dir; }
00071 void SetEnvironmentVariable(char *var) { _envvar = var; }

data.h 1098
Open Babel: API Documentation
00073 virtual void ParseLine(const char*) {}
00074 };
00075
00082 class OBAPI OBElement
00083 {
00084 int _num;
00085 char _symbol[4];
00086 std::string _name;
00087 double _Rcov,_Rvdw,_mass,_elNeg,_ARENeg,_ionize,_elAffinity;
00088 double _red, _green, _blue;
00089 int _maxbonds;
00090 public:
00092 OBElement() {}
00109 OBElement(int num, const char *sym, double ARENeg, double rcov,
00110 double rvdw, int maxbo, double mass, double elNeg, double ionize,
00111 double elAffin, double red, double green, double blue,
00112 std::string name) :
00113 _num(num), _name(name), _Rcov(rcov), _Rvdw(rvdw), _mass(mass),
00114 _elNeg(elNeg), _ARENeg(ARENeg), _ionize(ionize), _elAffinity(elAffin),
00115 _red(red), _green(green), _blue(blue),
00116 _maxbonds(maxbo)
00117 {
00118 strncpy(_symbol, sym, 4);
00119 }
00120
00122 int GetAtomicNum() { return(_num); }
00124 char *GetSymbol() { return(_symbol); }
00126 double GetCovalentRad() { return(_Rcov); }
00128 double GetVdwRad() { return(_Rvdw); }
00130 double GetMass() { return(_mass); }
00132 int GetMaxBonds() { return(_maxbonds);}
00134 double GetElectroNeg() { return(_elNeg); }
00136 double GetAllredRochowElectroNeg() { return(_ARENeg); }
00138 double GetIonization() { return(_ionize); }
00140 double GetElectronAffinity(){ return(_elAffinity); }
00142 std::string GetName() { return(_name); }
00144 double GetRed() { return(_red); }
00146 double GetGreen() { return(_green); }
00148 double GetBlue() { return(_blue); }
00149 };
00150
00151 // class introduction in data.cpp
00152 class OBAPI OBElementTable : public OBGlobalDataBase
00153 {
00154 std::vector<OBElement*> _element;
00155
00156 public:
00157
00158 OBElementTable(void);
00159 ~OBElementTable();
00160
00161 void ParseLine(const char*);
00162
00164 unsigned int GetNumberOfElements();
00166 unsigned int GetSize() { return GetNumberOfElements(); }
00167
00169 int GetAtomicNum(const char *);
00173 int GetAtomicNum(const char *, int &iso);
00175 const char *GetSymbol(int);
00177 double GetVdwRad(int);
00179 double GetCovalentRad(int);

data.h 1099
Open Babel: API Documentation
00182 double GetMass(int);
00185 double CorrectedBondRad(int,int = 3); // atomic #, hybridization
00188 double CorrectedVdwRad(int,int = 3); // atomic #, hybridization
00190 int GetMaxBonds(int);
00192 double GetElectroNeg(int);
00194 double GetAllredRochowElectroNeg(int);
00196 double GetIonization(int);
00198 double GetElectronAffinity(int);
00200 std::vector<double> GetRGB(int);
00202 std::string GetName(int);
00203 };
00204
00205 // class introduction in data.cpp
00206 class OBAPI OBIsotopeTable : public OBGlobalDataBase
00207 {
00208 std::vector<std::vector<std::pair <unsigned int, double> > > _isotopes;
00209
00210 public:
00211
00212 OBIsotopeTable(void);
00213 ~OBIsotopeTable() {}
00214
00216 unsigned int GetSize() { return _isotopes.size(); }
00217
00218 void ParseLine(const char*);
00221 double GetExactMass(const unsigned int atomicNum,
00222 const unsigned int isotope = 0);
00223 };
00224
00225 // class introduction in data.cpp
00226 class OBAPI OBTypeTable : public OBGlobalDataBase
00227 {
00228 int _linecount;
00229 unsigned int _ncols,_nrows;
00230 int _from,_to;
00231 std::vector<std::string> _colnames;
00232 std::vector<std::vector<std::string> > _table;
00233
00234 public:
00235
00236 OBTypeTable(void);
00237 ~OBTypeTable() {}
00238
00239 void ParseLine(const char*);
00240
00242 unsigned int GetSize() { return _table.size(); }
00243
00245 bool SetFromType(const char*);
00247 bool SetToType(const char*);
00249 bool Translate(char *to, const char *from); // to, from
00252 bool Translate(std::string &to, const std::string &from); // to, from
00255 std::string Translate(const std::string &from);
00256
00258 std::string GetFromType();
00260 std::string GetToType();
00261 };
00262
00268 class OBAPI OBResidueData : public OBGlobalDataBase
00269 {
00270 int _resnum;
00271 std::vector<std::string> _resname;

data.h 1100
Open Babel: API Documentation
00272 std::vector<std::vector<std::string> > _resatoms;
00273 std::vector<std::vector<std::pair<std::string,int> > > _resbonds;
00274
00275 //variables used only temporarily for parsing resdata.txt
00276 std::vector<std::string> _vatmtmp;
00277 std::vector<std::pair<std::string,int> > _vtmp;
00278 public:
00279
00280 OBResidueData();
00281 void ParseLine(const char*);
00282
00284 unsigned int GetSize() { return _resname.size(); }
00285
00289 bool SetResName(const std::string &);
00292 int LookupBO(const std::string &);
00295 int LookupBO(const std::string &, const std::string&);
00299 bool LookupType(const std::string &,std::string&,int&);
00303 bool AssignBonds(OBMol &,OBBitVec &);
00304 };
00305
00306 } // end namespace OpenBabel
00307
00308 #endif //DATA_H
00309

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

data.h 1101
data.h File Reference
Global data and resource file parsers. More...

#include <openbabel/babelconfig.h>
#include <stdio.h>
#include <fstream>
#include <vector>
#include <string>
#include <cstring>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBGlobalDataBase
Base data table class, handles reading data files. More...
class OBElement
Individual element data type. More...
class OBElementTable
Periodic Table of the Elements. More...
class OBIsotopeTable
Table of atomic isotope masses. More...
class OBTypeTable

data.h File Reference 1102


Open Babel: API Documentation

Atom Type Translation Table. More...


class OBResidueData
Table of common biomolecule residues (for PDB or other files). More...

Detailed Description
Global data and resource file parsers.

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

Classes 1103
Deprecated List

Member OpenBabel::matrix3x3::Get (int row, int column) const


use the constant operator() instead

Member OpenBabel::matrix3x3::Set (int row, int column, double v)


use the non-constant operator() instead

Member OpenBabel::matrix3x3::PlaneReflection (const vector3 &norm)


This method will probably replaced by a safer algorithm in the future.

Member OpenBabel::matrix3x3::RotAboutAxisByAngle (const vector3 &axis, const double angle)


This method will probably replaced by a safer algorithm in the future.

Member OpenBabel::OBAtom::GetCIdx () const


Use GetCoordinateIdx() instead

Member OpenBabel::OBAtom::GetNextAtom ()
Use any of the other iterator methods. This method will be removed in the future.

Member OpenBabel::OBAtom::KBOSum () const


Use BOSum() instead

Member OpenBabel::OBAtomTyper::CorrectAromaticNitrogens (OBMol &)


Currently unused for anything significant.

Member OpenBabel::OBBitVec::Empty () const


Use IsEmpty() instead.

Member OpenBabel::OBBitVec::BitIsOn (int bit_offset) const


Use BitIsSet(unsigned bit_offset) instead.

Member OpenBabel::OBBond::SetBO (int order)


Use SetBondOrder() instead.

Member OpenBabel::OBBond::SetKSingle ()
Use SetBondOrder() instead

Deprecated List 1104


Open Babel: API Documentation
Member OpenBabel::OBBond::SetKDouble ()
Use SetBondOrder() instead

Member OpenBabel::OBBond::SetKTriple ()
Use SetBondOrder() instead

Member OpenBabel::OBBond::GetBO () const


Use GetBondOrder() as this method may be removed.

Member OpenBabel::OBBond::IsKSingle ()
Use IsSingle() instead

Member OpenBabel::OBBond::IsKDouble ()
Use IsDouble() instead

Member OpenBabel::OBBond::IsKTriple ()
Use IsTriple() instead

Member OpenBabel::OBBond::Visit
Use OBBitVec objects instead to be fully thread-safe.

Member OpenBabel::OBElement::OBElement ()
Not used. Instead, initialize element properties

Member OpenBabel::OBElementTable::GetAtomicNum (const char *)


Does not properly handle 'D' or 'T' hydrogen isotopes

Member OpenBabel::OBFloatGrid::GetMin (double *a)


Will be removed. Use

Member OpenBabel::OBFloatGrid::GetMax (double *a)


Will be removed.

Member OpenBabel::OBFloatGrid::GetSpacing (double &s)


Will be removed.

Member OpenBabel::OBFloatGrid::GetDim (int *a)


May be removed in future.

Deprecated List 1105


Open Babel: API Documentation
Member OpenBabel::OBFloatGrid::SetLimits (const double origin[3], const double x[3], const double y[3],
const double z[3])
Will be removed.

Member OpenBabel::OBFloatGrid::GetVals ()
Will be removed.

Member OpenBabel::OBFloatGrid::SetVals (double *ptr)


Will be removed.

Member OpenBabel::OBForceField::LineSearch (OBAtom *atom, vector3 &direction)


Current code should use LineSearch(double *, double*) instead.

Member OpenBabel::OBForceField::VectorLengthDerivative (vector3 &a, vector3 &b)

Member OpenBabel::OBForceField::VectorAngleDerivative (vector3 &a, vector3 &b, vector3 &c)

Member OpenBabel::OBForceField::VectorOOPDerivative (vector3 &a, vector3 &b, vector3 &c, vector3


&d)

Member OpenBabel::OBForceField::VectorTorsionDerivative (vector3 &a, vector3 &b, vector3 &c, vector3


&d)

Member OpenBabel::OBForceField::UpdateCoordinates (OBMol &mol)


Use GetCooordinates instead.

Member OpenBabel::OBForceField::UpdateConformers (OBMol &mol)


Use GetConformers instead.

Member OpenBabel::OBGridData::GetOriginVector (double o[3]) const


Will be removed.

Member OpenBabel::OBGridData::SetLimits (const double origin[3], const double x[3], const double y[3],
const double z[3])
Will be removed.

Member OpenBabel::OBMol::CreateAtom (void)


Use NewAtom instead, which ensures internal connections

Deprecated List 1106


Open Babel: API Documentation
Member OpenBabel::OBMol::CreateBond (void)
Use NewBond instead, which ensures internal connections

Member OpenBabel::OBMol::CreateResidue (void)


Use NewResidue instead, which ensures internal connections

Member OpenBabel::OBMol::GetFirstAtom () const


Will be removed in favor of more standard iterator methods

Class OBProxGrid
May be removed in the future, since docking is not a key feature

Member OpenBabel::OBResidueData::LookupBO (const std::string &)


Easier to use the two-argument form

Member OpenBabel::OBResidueData::AssignBonds (OBMol &, OBBitVec &)


second OBBitVec argument is ignored

Member OpenBabel::OBRing::PathSize () const


Use Size() instead

Member OpenBabel::OBRotorList::IgnoreSymmetryRemoval ()
Currently has no effect

Member OpenBabel::OBRotorList::IdentifyEvalAtoms (OBMol &mol)


Not declared. Use Setup() for top-level functionality

Class OBScoreGrid
Will disappear in future versions. Use your own code.

Member OpenBabel::OBSmartsPattern::_growbond
(Not used)

Member OpenBabel::OBTypeTable::Translate (char *to, const char *from)


Because there is no guarantee on the length of an atom type you should consider using std::string
instead

Class patty

Deprecated List 1107


Open Babel: API Documentation
This code is currently not used by the Open Babel library. Instead, OBAtomTyper and
OBAromaticTyper are used. Unless there is interest in retaining this independent class, it will be
removed in the future.

Member OpenBabel::vector3::operator== (const vector3 &) const


This method uses unreliable floating point == comparisons Use vector3::IsApprox() instead.

Member OpenBabel::vector3::operator!= (const vector3 &other) const


This method uses unreliable floating point == comparisons Use vector3::IsApprox() instead.

Member ThrowError
Throw an error through the OpenBabel::OBMessageHandler class

Member ThrowError
Throw an error through the OpenBabel::OBMessageHandler class

Member IsNear
Use IsApprox() instead

Member IsNearZero

Member vectorAngle
This method will probably replaced by a safer algorithm in the future.

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

Deprecated List 1108


Open Babel: API Documentation

• Files

Deprecated List 1109


descriptor.cpp File Reference
Base class for molecular descriptors. More...

#include <openbabel/babelconfig.h>
#include <openbabel/oberror.h>
#include <openbabel/generic.h>
#include <openbabel/base.h>
#include <openbabel/descriptor.h>

Namespaces
namespace OpenBabel

Detailed Description
Base class for molecular descriptors.

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

descriptor.cpp File Reference 1110


descriptor.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 descriptor.h - Base class for molecular descriptors
00003
00004 Copyright (C) 2007 by Chris Morley
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_DESCRIPTOR_H
00020 #define OB_DESCRIPTOR_H
00021
00022 #include <string>
00023 #include <sstream>
00024 #include <limits>
00025
00026 #include <openbabel/plugin.h>
00027
00028 namespace OpenBabel
00029 {
00030 class OBBase; //Forward declaration; used only as pointer.
00031
00032 // Class introduction in descriptor.cpp
00033 class OBAPI OBDescriptor : public OBPlugin
00034 {
00035 MAKE_PLUGIN(OBDescriptor)
00036
00037 public:
00038 const char* TypeID(){return "descriptors";};
00039
00041 virtual double Predict(OBBase* pOb){return std::numeric_limits<double>::quiet_NaN();}
00042
00044 double PredictAndSave(OBBase* pOb);
00045
00047 virtual double GetStringValue(OBBase* pOb, std::string& svalue);
00048
00050 virtual bool Compare(OBBase* pOb, std::istream& ss, bool noEval);
00051
00055 virtual bool Display(std::string&txt, const char* param, const char* ID=NULL);
00056
00058 static bool FilterCompare(OBBase* pOb, std::istream& ss, bool noEval);
00059
00061 static void AddProperties(OBBase* pOb, const std::string& DescrList);
00062
00064 static void DeleteProperties(OBBase* pOb, const std::string& DescrList);
00065

descriptor.h 1111
Open Babel: API Documentation
00068 static std::string GetValues(OBBase* pOb, const std::string& DescrList);
00069
00070 protected:
00072 static std::string GetIdentifier(std::istream& optionText);
00073
00074 static double ParsePredicate(std::istream& optionText, char& ch1, char& ch2, std::strin
00075
00078 static bool ReadStringFromFilter(std::istream& ss, std::string& result);
00079
00082 static bool CompareStringWithFilter(std::istream& optionText, std::string& s, bool noEv
00083
00084 // Treats _ as not a punctuation character
00085 static bool ispunctU(char ch)
00086 {
00087 return ispunct(ch) && ch!='_';
00088 }
00089
00091 static bool MatchPairData(OBBase* pOb, std::string& s);
00092
00093 };
00094
00095 template <class T>
00096 static bool DoComparison(char ch1, char ch2, T& val, T& filterval)
00097 {
00098 switch(ch1)
00099 {
00100 case (0): //no comparison operator is same as =
00101 case('='):
00102 return val==filterval; //**needs a better floating point comparison**
00103 case('!'):
00104 return val!=filterval; //**needs a better floating point comparison**
00105 case('>'):
00106 if(ch2=='=')
00107 return val>=filterval;
00108 else
00109 return val>filterval;
00110 case('<'):
00111 if(ch2=='=')
00112 return val<=filterval;
00113 else
00114 return val<filterval;
00115 }
00116 return false;
00117 }
00118
00119 }//namespace
00120 #endif
00121

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

descriptor.h 1112
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

descriptor.h 1113
descriptor.h File Reference
Base class for molecular descriptors. More...

#include <string>
#include <sstream>
#include <limits>
#include <openbabel/plugin.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 OBDescriptor
Base class for molecular properties, descriptors or features. More...

Functions
template<class T>
static bool DoComparison (char ch1, char ch2, T &val, T &filterval)

Detailed Description
Base class for molecular descriptors.

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

descriptor.h File Reference 1114


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

Detailed Description 1115


dlhandler.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 dlhandler.h - Dynamic loader for file format modules.
00003
00004 Copyright (C) 2004-2005 by Chris Morley
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_DLHANDLER_H
00020 #define OB_DLHANDLER_H
00021
00022 #include <openbabel/babelconfig.h>
00023
00024 #include <string>
00025 #include <vector>
00026
00027 // These macros are used in DLL builds. If they have not
00028 // been set in babelconfig.h, define them as nothing.
00029 #ifndef OBERROR
00030 #define OBERROR
00031 #endif
00032 #ifndef OBDLL
00033 #define OBDLL
00034 #endif
00035
00046 class OBERROR DLHandler
00047 {
00048 public:
00049
00054 static bool getConvDirectory(std::string& convPath);
00055
00065 static int findFiles (std::vector <std::string>& file_list,
00066 const std::string& pattern, const std::string& path);
00067
00074 static int findFiles (std::vector<std::string>& file_list,const std::string &file
00075
00077 static bool openLib(const std::string& lib_name);
00078
00080 static const char* getFormatFilePattern();
00081
00083 static char getSeparator();
00084
00086 static void Sleep(int n);
00087
00088 };

dlhandler.h 1116
Open Babel: API Documentation
00089
00090 #endif /* DLHANDLER_H*/
00091

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

dlhandler.h 1117
dlhandler.h File Reference
Dynamic loader for file format modules. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <vector>

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

Go to the source code of this file.

Classes
class DLHandler
Interface for dynamic libraries. More...

Detailed Description
Dynamic loader for file format modules.

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

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

dlhandler.h File Reference 1118


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 1119


dlhandler_unix.cpp File Reference
Dynamic loader for UNIX (handles file format shared obj.). More...

#include <openbabel/dlhandler.h>
#include <openbabel/babelconfig.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <dlfcn.h>
#include <cstring>
#include <cstdlib>

Namespaces
namespace OpenBabel

Defines
#define BUFF_SIZE 32768

Functions
OBERROR bool tokenize (std::vector< std::string > &, const char *buf, const char *delimstr=" \t\n\r")
int matchFiles (SCANDIR_CONST struct dirent *entry_p)

Detailed Description
Dynamic loader for UNIX (handles file format shared obj.).

Define Documentation

#define BUFF_SIZE 32768

Function Documentation

int matchFiles ( SCANDIR_CONST struct dirent * entry_p )

Referenced by DLHandler::findFiles().

dlhandler_unix.cpp File Reference 1120


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

Function Documentation 1121


dlhandler_win32.cpp File Reference
Dynamic loader for Win32 (handles file format DDLs). More...

#include <openbabel/babelconfig.h>
#include <cstdarg>
#include <iostream>
#include <windows.h>
#include <openbabel/dlhandler.h>

Defines
#define VC_EXTRALEAN

Detailed Description
Dynamic loader for Win32 (handles file format DDLs).

Define Documentation

#define VC_EXTRALEAN

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

• File List

dlhandler_win32.cpp File Reference 1122


Open Babel: API Documentation

• File Members

Define Documentation 1123


File List
Here is a list of all files with brief descriptions:

OBGenericData class to for atom alias data (e.g., in 2D drawing programs for
alias.cpp
"COOH")
OBGenericData class to for atom alias data (e.g., in 2D drawing programs for
alias.h [code]
"COOH")
atom.cpp Handle OBAtom class
atom.h [code] Handle atoms
atomclass.h [code] Handle atom classes in reaction SMILES/SMIRKS
base.cpp Implementation of base classes
base.h [code] Base classes to build a graph
bitvec.cpp Fast and efficient bitstring class
bitvec.h [code] Fast and efficient bitstring class
bond.cpp Handle OBBond class
bond.h [code] Handle bonds
bondtyper.cpp Bond typer to perceive connectivity and bond orders/types
bondtyper.h [code] Bond typer to perceive connectivity and bond orders/types
builder.cpp Handle OBBuilder class
builder.h [code] Class to build 3D structures
canon.cpp Canonical numbering of SMILES, molecules and fragments
canon.h [code] Canonical numbering of SMILES, molecules and fragments
chains.cpp Parse for macromolecule chains and residues
chains.h [code] Parse for macromolecule chains and residues
chiral.cpp Detect chiral atoms and molecules
chiral.h [code] Detect chiral atoms and molecules
data.cpp Global data and resource file parsers
data.h [code] Global data and resource file parsers
descriptor.cpp Base class for molecular descriptors
descriptor.h [code] Base class for molecular descriptors
dlhandler.h [code] Dynamic loader for file format modules
dlhandler_unix.cpp Dynamic loader for UNIX (handles file format shared obj.)
dlhandler_win32.cpp Dynamic loader for Win32 (handles file format DDLs)
fingerprint.cpp Definitions for OBFingerprint base class and fastsearch classes
fingerprint.h [code] Declaration of OBFingerprint base class and fastsearch classes
forcefield.cpp Handle OBForceField class
forcefield.h [code] Handle forcefields
format.cpp Base class OBFormat for file formats
format.h [code] Declarations for OBFormat
generic.cpp Handle OBGenericData classes. Custom data for atoms, bonds, etc
generic.h [code] Handle generic data classes. Custom data for atoms, bonds, etc

File List 1124


Open Babel: API Documentation

grid.cpp Handle grids of values


grid.h [code] Handle grids of values
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential)
griddata.cpp
to molecules
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential)
griddata.h [code]
to molecules
groupcontrib.h [code] Handle group contribution algorithms
Declaration of OBInternalCoord class, conversion between Cartesian and Z-matrix
internalcoord.h [code]
form
kekulize.cpp Alternate algorithm to kekulize a molecule (OBMol::NewPerceiveKekuleBonds())
kinetics.h [code] OBRateData and OBNasaThermoData classes
lineend.h [code] Translate line endings automatically (UNIX, Classic Mac, DOS)
locale.cpp Handle internal numeric locale issues -- parse data in "C"
locale.h [code] Handle internal numeric locale issues -- parse data in "C"
matrix.cpp Operations on arbitrary-sized matrix
matrix.h [code] Operations on arbitrary-sized matrix
matrix3x3.cpp Handle 3D rotation matrix
matrix3x3.h [code] Handle 3D Rotation matrix
mol.cpp Handle molecules. Implementation of OBMol
Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the
mol.h [code]
main header for Open Babel)
molchrg.cpp Assign Gasteiger partial charges
molchrg.h [code] Assign Gasteiger partial charges
obconversion.cpp Implementation of OBFormat and OBConversion classes
obconversion.h [code] Handle file conversions. Declaration of OBFormat, OBConversion
oberror.cpp Handle error messages, warnings, notices, etc. Implements OBMessageHandler class
oberror.h [code] Handle error messages, warnings, notices, etc
obiter.cpp STL-style iterators for Open Babel
obiter.h [code] STL-style iterators for Open Babel
obmolecformat.cpp Subclass of OBFormat for conversion of OBMol
obmolecformat.h
Subclass of OBFormat for conversion of OBMol
[code]
obutil.cpp Various utility methods
obutil.h [code] Various utility methods
op.h [code] Base plugin class for operations on molecules
ops.cpp Base plugin class for operations on molecules
Operations to change molecules using a datafile of chemical transformations
optransform.h [code]
OBChemTsfm
parsmart.cpp Implementation of Daylight SMARTS parser
parsmart.h [code] Daylight SMARTS parser
patty.cpp Programmable atom typer
patty.h [code] Programmable atom typer. (abbreviated P.At.Ty.)
phmodel.cpp Read pH rules and assign charges

File List 1125


Open Babel: API Documentation

phmodel.h [code] Read pH rules and assign charges


plugin.cpp Simplify 'plugin' classes to be discovered and/or loaded at runtime
plugin.h [code] Simplify 'plugin' classes to be discovered and/or loaded at runtime
pointgroup.cpp Brute-force point group detection
pointgroup.h [code] Brute-force point group detection
rand.cpp Pseudo random number generator
rand.h [code] Pseudo random number generator
RDKitConv.h [code] Allow conversion from OBMol to RDKit RWMol
reaction.h [code] Handle chemical reactions (i.e., lists of reagents and products)
residue.cpp Handle macromolecule residues
residue.h [code] Defines for residue properties, names, etc
ring.cpp Deal with rings, find smallest set of smallest rings (SSSR)
ring.h [code] Deal with rings, find smallest set of smallest rings (SSSR)
rotamer.cpp Handle rotamer list data
rotamer.h [code] Handle rotamer list data
rotor.cpp Rotate dihedral angles according to rotor rules
rotor.h [code] Rotate torsional according to rotor rules
snprintf.h [code]
spacegroup.cpp Handle Crystallographic Space Groups
spacegroup.h [code] Handle Crystallographic Space Groups
tokenst.cpp Tokenize a string
tokenst.h [code] Tokenize strings, open data files
transform.cpp Perform command-line requested transformations for OBMol and SMARTS filtering
transform3d.cpp Handle 3D transformations in space groups
transform3d.h [code] Handle 3D transformations in space groups
typer.cpp Open Babel atom and aromaticity typer
typer.h [code] Open Babel atom and aromaticity typer
vector3.cpp Handle 3D coordinates
vector3.h [code] Handle 3D coordinates
Declaration of XMLConversion, declaration and definition of XMLBaseFormat and
xml.h [code]
XMLMoleculeFormat

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:

File List 1126


Open Babel: API Documentation

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

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

File List 1127


fingerprint.cpp File Reference
Definitions for OBFingerprint base class and fastsearch classes. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <algorithm>
#include <iosfwd>
#include <fstream>
#include <openbabel/fingerprint.h>
#include <openbabel/oberror.h>

Namespaces
namespace OpenBabel

Detailed Description
Definitions for OBFingerprint base class and fastsearch 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:52 2008 by 1.5.6.

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

fingerprint.cpp File Reference 1128


fingerprint.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 fingerprint.h - Base class for fingerprints and fast searching
00003
00004 Copyright (C) 2005 by Chris Morley
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_FINGERPRINT_H
00020 #define OB_FINGERPRINT_H
00021
00022 #include <list>
00023 #include <map>
00024 #include <set>
00025 #include <vector>
00026 #include <string>
00027
00028 #include <openbabel/plugin.h>
00029
00030 #ifndef OBFPRT
00031 #define OBFPRT
00032 #endif
00033
00034 namespace OpenBabel
00035 {
00036 class OBBase; //Forward declaration; used only as pointer.
00037
00039 class OBFPRT OBFingerprint : public OBPlugin
00040 {
00041 //see end of cpp file for detailed documentation
00042
00043 MAKE_PLUGIN(OBFingerprint)
00044
00045 const char* TypeID()
00046 {
00047 return "fingerprints";
00048 }
00049
00050 //Rest of OBFingerprints declarations
00051 public:
00052
00053 virtual ~OBFingerprint(){}
00054
00056 void SetBit(std::vector<unsigned int>& vec, const unsigned int n);
00057

fingerprint.h 1129
Open Babel: API Documentation
00059 bool GetBit(const std::vector<unsigned int>& vec, const unsigned int n);
00060
00062 void Fold(std::vector<unsigned int>& vec, unsigned int nbits);
00063
00065 virtual bool GetFingerprint(OBBase* pOb, std::vector<unsigned int>& fp, int nbits=0)=0;
00066
00068 enum FptFlag{FPT_UNIQUEBITS=1};
00069 virtual unsigned int Flags() { return 0;};
00070
00073 virtual std::string DescribeBits(const std:: vector<unsigned int> fp, bool bSet=true)
00074 {
00075 std::string txt("");
00076 return txt;
00077 }
00078
00080 static double Tanimoto(const std::vector<unsigned int>& vec1, const std::vector<unsigne
00081
00083 static double Tanimoto(const std::vector<unsigned int>& vec1, const unsigned int* p2)
00084 {
00086 int andbits=0, orbits=0;
00087 unsigned int i;
00088 for (i=0;i<vec1.size();++i)
00089 {
00090 int andfp = vec1[i] & p2[i];
00091 int orfp = vec1[i] | p2[i];
00092 // Count bits
00093 #ifdef __GNUC__
00094 andbits += __builtin_popcount(andfp);
00095 orbits += __builtin_popcount(orfp);
00096 #else
00097 for(;andfp;andfp=andfp<<1)
00098 if(andfp<0) ++andbits;
00099 for(;orfp;orfp=orfp<<1)
00100 if(orfp<0) ++orbits;
00101 #endif
00102 }
00103 return((double)andbits/(double)orbits);
00104 };
00105
00106 static unsigned int Getbitsperint(){ return bitsperint; }
00107
00108 private:
00110 struct bit_or
00111 {
00112 unsigned int operator()(const unsigned int a, const unsigned int b)
00113 {
00114 return a | b;
00115 }
00116 };
00117
00118
00119 public:
00122 static OBFingerprint* FindFingerprint(const char* ID){ return FindType(ID);}
00123
00124 private:
00125 static const unsigned int bitsperint;// = 8 * sizeof(unsigned int);
00126 };
00127
00128 //Fast search routines
00131 struct OBFPRT FptIndexHeader
00132 {

fingerprint.h 1130
Open Babel: API Documentation
00133 unsigned int headerlength;
00134 unsigned int nEntries;
00135 unsigned int words;
00136 char fpid[16];
00137 char datafilename[256];
00138 };
00139
00142 struct OBFPRT FptIndex
00143 {
00144 FptIndexHeader header;
00145 std::vector<unsigned int> fptdata;
00146 std::vector<unsigned int> seekdata;
00147 bool Read(std::istream* pIndexstream);
00149 OBFingerprint* CheckFP();
00150 };
00151
00154 class OBFPRT FastSearch
00155 {
00156 //see end of cpp file for detailed documentation
00157 public:
00159 std::string ReadIndexFile(std::string IndexFilename);
00160 std::string ReadIndex(std::istream* pIndexstream);
00161
00162 virtual ~FastSearch(){};
00163
00165 bool Find(OBBase* pOb, std::vector<unsigned int>& SeekPositions, unsigned int MaxCand
00166
00169 bool FindMatch(OBBase* pOb, std::vector<unsigned int>& SeekPositions,
00170 unsigned int MaxCandidates);
00171
00174 bool FindSimilar(OBBase* pOb, std::multimap<double, unsigned int>& SeekposMap,
00175 double MinTani);
00176
00179 bool FindSimilar(OBBase* pOb, std::multimap<double, unsigned int>& SeekposMap,
00180 int nCandidates=0);
00181
00183 OBFingerprint* GetFingerprint() const{ return _pFP;};
00184
00186 const FptIndexHeader& GetIndexHeader() const{ return _index.header;};
00187
00188 private:
00189 FptIndex _index;
00190 OBFingerprint* _pFP;
00191 };
00192
00195 class OBFPRT FastSearchIndexer
00196 {
00197 //see end of cpp file for detailed documentation
00198 public:
00200 FastSearchIndexer(std::string& datafilename, std::ostream* os, std::string& fpid,
00201 int FptBits=0);
00202
00204 FastSearchIndexer(FptIndex* pindex, std::ostream* os);
00205
00206 ~FastSearchIndexer();
00207
00209 bool Add(OBBase* pOb, std::streampos seekpos);
00210
00211 private:
00212 std::ostream* _indexstream;
00213 FptIndex* _pindex;

fingerprint.h 1131
Open Babel: API Documentation
00214 OBFingerprint* _pFP;
00215 int _nbits;
00216 };
00217
00218 } //namespace OpenBabel
00219 #endif
00220

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

fingerprint.h 1132
fingerprint.h File Reference
Declaration of OBFingerprint base class and fastsearch classes. More...

#include <list>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <openbabel/plugin.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 OBFingerprint
The base class for fingerprints. More...
struct OBFingerprint::bit_or
Function object to set bits.
struct FptIndexHeader
Header for fastsearch index file. More...
struct FptIndex
Structure of fastsearch index files. More...
class FastSearch
Class to search fingerprint index files. More...
class FastSearchIndexer
Class to prepare fingerprint index files See FastSearch class for details. More...

Detailed Description
Declaration of OBFingerprint base class and fastsearch classes.

fingerprint.h File Reference 1133


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

Detailed Description 1134


forcefield.cpp File Reference
Handle OBForceField class. More...

#include <openbabel/babelconfig.h>
#include <openbabel/forcefield.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>

Namespaces
namespace OpenBabel

Functions
void Reweight (std::vector< std::vector< double > > &rotorWeights, std::vector< int > rotorKey,
double bonus)

Detailed Description
Handle OBForceField 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

forcefield.cpp File Reference 1135


Open Babel: API Documentation

• Classes
• Files

Detailed Description 1136


forcefield.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 forcefield.h - Handle OBForceField class.
00003
00004 Copyright (C) 2006-2007 by Tim Vandermeersch <tim.vandermeersch@gmail.com>
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_FORCEFIELD_H
00020 #define OB_FORCEFIELD_H
00021
00022 #include <vector>
00023 #include <string>
00024 #include <map>
00025
00026 #include <list>
00027 #include <set>
00028 #include <openbabel/babelconfig.h>
00029 #include <openbabel/base.h>
00030 #include <openbabel/mol.h>
00031 #include <openbabel/plugin.h>
00032 #include <openbabel/grid.h>
00033 #include <openbabel/griddata.h>
00034 #include <float.h>
00035
00036 namespace OpenBabel
00037 {
00038 // log levels
00039 #define OBFF_LOGLVL_NONE 0
00040 #define OBFF_LOGLVL_LOW 1
00041 #define OBFF_LOGLVL_MEDIUM 2
00042 #define OBFF_LOGLVL_HIGH 3
00043
00044 // terms
00045 #define OBFF_ENERGY (1 << 0)
00046 #define OBFF_EBOND (1 << 1)
00047 #define OBFF_EANGLE (1 << 2)
00048 #define OBFF_ESTRBND (1 << 3)
00049 #define OBFF_ETORSION (1 << 4)
00050 #define OBFF_EOOP (1 << 5)
00051 #define OBFF_EVDW (1 << 6)
00052 #define OBFF_EELECTROSTATIC (1 << 7)
00053
00054 // constraint types
00055 #define OBFF_CONST_IGNORE (1 << 0)

forcefield.h 1137
Open Babel: API Documentation
00056 #define OBFF_CONST_ATOM (1 << 1)
00057 #define OBFF_CONST_ATOM_X (1 << 2)
00058 #define OBFF_CONST_ATOM_Y (1 << 3)
00059 #define OBFF_CONST_ATOM_Z (1 << 4)
00060 #define OBFF_CONST_DISTANCE (1 << 5)
00061 #define OBFF_CONST_ANGLE (1 << 6)
00062 #define OBFF_CONST_TORSION (1 << 7)
00063 #define OBFF_CONST_CHIRAL (1 << 8)
00064
00065 // mode arguments for SteepestDescent, ConjugateGradients, ...
00066 #define OBFF_NUMERICAL_GRADIENT (1 << 0)
00067 #define OBFF_ANALYTICAL_GRADIENT (1 << 1)
00068
00069 #define KCAL_TO_KJ 4.1868
00070
00071 // inline if statements for logging.
00072 #define IF_OBFF_LOGLVL_LOW if(_loglvl >= OBFF_LOGLVL_LOW)
00073 #define IF_OBFF_LOGLVL_MEDIUM if(_loglvl >= OBFF_LOGLVL_MEDIUM)
00074 #define IF_OBFF_LOGLVL_HIGH if(_loglvl >= OBFF_LOGLVL_HIGH)
00075
00077 struct LineSearchType
00078 {
00079 enum {
00080 Simple, Newton2Num
00081 };
00082 };
00083 /*
00084 struct ConstraintType
00085 {
00086 enum {
00087 Ignore, Atom, AtomX, AtomY, AtomZ, Distance, Angle, Torsion, Chiral
00088 };
00089 };
00090 */
00091
00094 class OBFPRT OBFFParameter {
00095 public:
00097 int a, b, c, d;
00099 std::string _a, _b, _c, _d;
00100
00102 std::vector<int> _ipar;
00104 std::vector<double> _dpar;
00105
00107 OBFFParameter& operator=(const OBFFParameter &ai)
00108 {
00109 if (this != &ai) {
00110 a = ai.a;
00111 b = ai.b;
00112 c = ai.c;
00113 d = ai.d;
00114 _a = ai._a;
00115 _b = ai._b;
00116 _c = ai._c;
00117 _d = ai._d;
00118 _ipar = ai._ipar;
00119 _dpar = ai._dpar;
00120 }
00121
00122 return *this;
00123 }
00124

forcefield.h 1138
Open Babel: API Documentation
00126 void clear ()
00127 {
00128 a = b = c = d = 0;
00129 _ipar.clear();
00130 _dpar.clear();
00131 }
00132 }; // class OBFFParameter
00133
00134 // specific class introductions in forcefieldYYYY.cpp (for YYYY calculations)
00135
00138 class OBFPRT OBFFCalculation2
00139 {
00140 public:
00142 double energy;
00144 OBAtom *a, *b;
00146 int idx_a, idx_b;
00148 double *pos_a, *pos_b;
00150 double force_a[3], force_b[3];
00152 virtual ~OBFFCalculation2()
00153 {
00154 }
00157 virtual void SetupPointers()
00158 {
00159 if (!a || !b) return;
00160 pos_a = a->GetCoordinate();
00161 idx_a = a->GetIdx();
00162 pos_b = b->GetCoordinate();
00163 idx_b = b->GetIdx();
00164 }
00165 };
00166
00169 class OBFPRT OBFFCalculation3: public OBFFCalculation2
00170 {
00171 public:
00173 OBAtom *c;
00175 int idx_c;
00177 double *pos_c;
00179 double force_c[3];
00181 virtual ~OBFFCalculation3()
00182 {
00183 }
00186 virtual void SetupPointers()
00187 {
00188 if (!a || !b || !c) return;
00189 pos_a = a->GetCoordinate();
00190 idx_a = a->GetIdx();
00191 pos_b = b->GetCoordinate();
00192 idx_b = b->GetIdx();
00193 pos_c = c->GetCoordinate();
00194 idx_c = c->GetIdx();
00195 }
00196 };
00197
00200 class OBFPRT OBFFCalculation4: public OBFFCalculation3
00201 {
00202 public:
00204 OBAtom *d;
00206 int idx_d;
00208 double *pos_d;
00210 double force_d[3];
00212 virtual ~OBFFCalculation4()

forcefield.h 1139
Open Babel: API Documentation
00213 {
00214 }
00217 void SetupPointers()
00218 {
00219 if (!a || !b || !c || !d) return;
00220 pos_a = a->GetCoordinate();
00221 idx_a = a->GetIdx();
00222 pos_b = b->GetCoordinate();
00223 idx_b = b->GetIdx();
00224 pos_c = c->GetCoordinate();
00225 idx_c = c->GetIdx();
00226 pos_d = d->GetCoordinate();
00227 idx_d = d->GetIdx();
00228 }
00229 };
00230
00234 class OBFPRT OBFFConstraint
00235 {
00236 public:
00238 double factor, constraint_value;
00239 double rab0, rbc0;
00241 int type, ia, ib, ic, id;
00243 OBAtom *a, *b, *c, *d;
00245 vector3 grada, gradb, gradc, gradd;
00246
00248 OBFFConstraint()
00249 {
00250 a = b = c = d = NULL;
00251 ia = ib = ic = id = 0;
00252 constraint_value = 0.0;
00253 factor = 0.0;
00254 }
00256 ~OBFFConstraint()
00257 {
00258 }
00259
00260 vector3 GetGradient(int a)
00261 {
00262 if (a == ia)
00263 return grada;
00264 else if (a == ib)
00265 return gradb;
00266 else if (a == ic)
00267 return gradc;
00268 else if (a == id)
00269 return gradd;
00270 else
00271 return VZero;
00272 }
00273 };
00274
00278 class OBFPRT OBFFConstraints
00279 {
00280 public:
00282 OBFFConstraints();
00284 ~OBFFConstraints()
00285 {
00286 _constraints.clear();
00287 _ignored.Clear();
00288 _fixed.Clear();
00289 _Xfixed.Clear();

forcefield.h 1140
Open Babel: API Documentation
00290 _Yfixed.Clear();
00291 _Zfixed.Clear();
00292 }
00294 void Clear();
00296 double GetConstraintEnergy();
00298 vector3 GetGradient(int a);
00300 OBFFConstraints& operator=(const OBFFConstraints &ai)
00301 {
00302 if (this != &ai) {
00303 _constraints = ai._constraints;
00304 _ignored = ai._ignored;
00305 _fixed = ai._fixed;
00306 _Xfixed = ai._Xfixed;
00307 _Yfixed = ai._Yfixed;
00308 _Zfixed = ai._Zfixed;
00309 }
00310 return *this;
00311 }
00312
00316 void Setup(OBMol &mol);
00317
00319 // Set Constraints //
00322
00323
00324 void SetFactor(double factor);
00326 void AddIgnore(int a);
00328 void AddAtomConstraint(int a);
00330 void AddAtomXConstraint(int a);
00332 void AddAtomYConstraint(int a);
00334 void AddAtomZConstraint(int a);
00336 void AddDistanceConstraint(int a, int b, double length);
00338 void AddAngleConstraint(int a, int b, int c, double angle);
00340 void AddTorsionConstraint(int a, int b, int c, int d, double torsion);
00343 void DeleteConstraint(int index);
00345
00346 // Get Constraints //
00349
00350
00351 double GetFactor();
00353 int Size() const;
00363 int GetConstraintType(int index) const;
00367 double GetConstraintValue(int index) const;
00370 int GetConstraintAtomA(int index) const;
00373 int GetConstraintAtomB(int index) const;
00376 int GetConstraintAtomC(int index) const;
00379 int GetConstraintAtomD(int index) const;
00382 bool IsIgnored(int a);
00385 bool IsFixed(int a);
00388 bool IsXFixed(int a);
00391 bool IsYFixed(int a);
00394 bool IsZFixed(int a);
00398 OBBitVec GetIgnoredBitVec() { return _ignored; }
00400
00401 private:
00402 std::vector<OBFFConstraint> _constraints;
00403 OBBitVec _ignored;
00404 OBBitVec _fixed;
00405 OBBitVec _Xfixed;
00406 OBBitVec _Yfixed;
00407 OBBitVec _Zfixed;
00408 double _factor;

forcefield.h 1141
Open Babel: API Documentation
00409 };
00410
00411 // Class OBForceField
00412 // class introduction in forcefield.cpp
00413 class OBFPRT OBForceField : public OBPlugin
00414 {
00415 MAKE_PLUGIN(OBForceField)
00416
00417 protected:
00418
00460 OBFFParameter* GetParameter(int a, int b, int c, int d, std::vector<OBFFParameter> &p
00462 OBFFParameter* GetParameter(const char* a, const char* b, const char* c, const char* d
00463 std::vector<OBFFParameter> &parameter);
00465 int GetParameterIdx(int a, int b, int c, int d, std::vector<OBFFParameter> &parameter
00466
00475 vector3 NumericalDerivative(OBAtom *a, int terms = OBFF_ENERGY);
00477 vector3 NumericalSecondDerivative(OBAtom *a, int terms = OBFF_ENERGY);
00478
00479 /*
00480 * NEW gradients functions
00481 */
00482
00485 void SetGradient(double *grad, int idx)
00486 {
00487 const int coordIdx = (idx - 1) * 3;
00488 for (unsigned int i = 0; i < 3; ++i) {
00489 _gradientPtr[coordIdx + i] = grad[i];
00490 }
00491 }
00492
00495 void AddGradient(double *grad, int idx)
00496 {
00497 const int coordIdx = (idx - 1) * 3;
00498 for (unsigned int i = 0; i < 3; ++i) {
00499 _gradientPtr[coordIdx + i] += grad[i];
00500 }
00501 }
00502
00505 virtual vector3 GetGradient(OBAtom *a, int /*terms*/ = OBFF_ENERGY)
00506 {
00507 const int coordIdx = (a->GetIdx() - 1) * 3;
00508 return _gradientPtr + coordIdx;
00509 }
00510
00513 double* GetGradientPtr()
00514 {
00515 return _gradientPtr;
00516 }
00517
00520 virtual void ClearGradients()
00521 {
00522 // We cannot use memset because IEEE floating point representations
00523 // are not guaranteed by C/C++ standard, but this loop can be
00524 // unrolled or vectorized by compilers
00525 for (unsigned int i = 0; i < _ncoords; ++i)
00526 _gradientPtr[i] = 0.0;
00527 // memset(_gradientPtr, '\0', sizeof(double)*_ncoords);
00528 }
00529
00537 bool IsInSameRing(OBAtom* a, OBAtom* b);
00538

forcefield.h 1142
Open Babel: API Documentation
00539 // general variables
00540 OBMol _mol;
00541 bool _init;
00542 std::string _parFile;
00543 bool _validSetup;
00544 double *_gradientPtr;
00545 // logging variables
00546 std::ostream* _logos;
00547 char _logbuf[BUFF_SIZE+1];
00548 int _loglvl;
00549 int _origLogLevel;
00550 // conformer genereation (rotor search) variables
00551 int _current_conformer;
00552 std::vector<double> _energies;
00553 // minimization variables
00554 double _econv, _e_n1;
00555 int _cstep, _nsteps;
00556 double *_grad1;
00557 unsigned int _ncoords;
00558 int _linesearch;
00559 // molecular dynamics variables
00560 double _timestep;
00561 double _temp;
00562 double *_velocityPtr;
00563 // contraint varibles
00564 static OBFFConstraints _constraints;
00565 static int _fixAtom;
00566 static int _ignoreAtom;
00567 // cut-off variables
00568 bool _cutoff;
00569 double _rvdw;
00570 double _rele;
00571 OBBitVec _vdwpairs;
00572 OBBitVec _elepairs;
00573 int _pairfreq;
00574 // group variables
00575 std::vector<OBBitVec> _intraGroup;
00576 std::vector<OBBitVec> _interGroup;
00577 std::vector<std::pair<OBBitVec, OBBitVec> > _interGroups;
00578
00579 public:
00583 virtual OBForceField* MakeNewInstance()=0;
00584
00586 virtual ~OBForceField()
00587 {
00588 if (_grad1 != NULL) {
00589 delete [] _grad1;
00590 _grad1 = NULL;
00591 }
00592 }
00593
00595 const char* TypeID()
00596 {
00597 return "forcefields";
00598 }
00599
00603 static OBForceField* FindForceField(const std::string& ID)
00604 {
00605 return FindType(ID.c_str());
00606 }
00610 static OBForceField* FindForceField(const char *ID)

forcefield.h 1143
Open Babel: API Documentation
00611 {
00612 return FindType(ID);
00613 }
00614 /*
00615 *
00616 */
00617 void SetParameterFile(const std::string &filename)
00618 {
00619 _parFile = filename;
00620 _init = false;
00621 }
00624 virtual std::string GetUnit() { return std::string("au"); }
00625 /* Does this force field have analytical gradients defined for all
00626 * calculation components (bonds, angles, non-bonded, etc.)
00627 * If this is true, code should default to using OBFF_ANALYTICAL_GRADIENT
00628 * for SteepestDescent() or ConjugateGradients().
00629 * \return True if all analytical gradients are implemented.
00630 */
00631 virtual bool HasAnalyticalGradients() { return false; }
00636 bool Setup(OBMol &mol);
00642 bool Setup(OBMol &mol, OBFFConstraints &constraints);
00646 // move to protected in future version
00647 virtual bool ParseParamFile() { return false; }
00651 // move to protected in future version
00652 virtual bool SetTypes() { return false; }
00656 // move to protected in future version
00657 virtual bool SetFormalCharges() { return false; }
00661 // move to protected in future version
00662 virtual bool SetPartialCharges() { return false; }
00666 // move to protected in future version
00667 virtual bool SetupCalculations() { return false; }
00672 // move to protected in future version
00673 virtual bool SetupPointers() { return false; }
00679 bool IsSetupNeeded(OBMol &mol);
00695 bool GetAtomTypes(OBMol &mol);
00711 bool GetPartialCharges(OBMol &mol);
00712
00713
00714
00719 bool GetCoordinates(OBMol &mol);
00721 bool UpdateCoordinates(OBMol &mol) {return GetCoordinates(mol); }
00726 bool GetConformers(OBMol &mol);
00728 bool UpdateConformers(OBMol &mol) { return GetConformers(mol); }
00733 bool SetCoordinates(OBMol &mol);
00738 bool SetConformers(OBMol &mol);
00748 OBGridData *GetGrid(double step, double padding, const char *type, double pchg);
00749
00751 // Interacting groups //
00753
00755
00756
00760 void AddIntraGroup(OBBitVec &group);
00765 void AddInterGroup(OBBitVec &group);
00773 void AddInterGroups(OBBitVec &group1, OBBitVec &group2);
00776 void ClearGroups();
00779 bool HasGroups();
00781
00783 // Cut-off //
00785
00787
00788

forcefield.h 1144
Open Babel: API Documentation
00791 void EnableCutOff(bool enable)
00792 {
00793 _cutoff = enable;
00794 }
00797 bool IsCutOffEnabled()
00798 {
00799 return _cutoff;
00800 }
00804 void SetVDWCutOff(double r)
00805 {
00806 _rvdw = r;
00807 }
00811 double GetVDWCutOff()
00812 {
00813 return _rvdw;
00814 }
00819 void SetElectrostaticCutOff(double r)
00820 {
00821 _rele = r;
00822 }
00826 double GetElectrostaticCutOff()
00827 {
00828 return _rele;
00829 }
00835 void SetUpdateFrequency(int f)
00836 {
00837 _pairfreq = f;
00838 }
00842 int GetUpdateFrequency()
00843 {
00844 return _pairfreq;
00845 }
00850 void UpdatePairsSimple();
00851
00852 //void UpdatePairsGroup(); TODO
00853
00857 unsigned int GetNumPairs();
00861 void EnableAllPairs()
00862 {
00863 // TODO: OBBitVec doesn't seem to be allocating it's memory correctly
00864 //_vdwpairs.SetRangeOn(0, _numpairs-1);
00865 //_elepairs.SetRangeOn(0, _numpairs-1);
00866 }
00868
00870 // Energy Evaluation //
00872
00874
00875
00884 virtual double Energy(bool = true) { return 0.0f; }
00891 virtual double E_Bond(bool = true) { return 0.0f; }
00898 virtual double E_Angle(bool = true) { return 0.0f; }
00905 virtual double E_StrBnd(bool = true) { return 0.0f; }
00912 virtual double E_Torsion(bool = true) { return 0.0f; }
00919 virtual double E_OOP(bool = true) { return 0.0f; }
00926 virtual double E_VDW(bool = true) { return 0.0f; }
00933 virtual double E_Electrostatic(bool = true) { return 0.0f; }
00935
00937 // Logging //
00939
00941
00942

forcefield.h 1145
Open Babel: API Documentation
00944 void PrintTypes();
00948 void PrintFormalCharges();
00951 void PrintPartialCharges();
00954 void PrintVelocities();
00959 bool SetLogFile(std::ostream *pos);
00984 bool SetLogLevel(int level);
00987 int GetLogLevel() { return _loglvl; }
00991 void OBFFLog(std::string msg)
00992 {
00993 if (!_logos)
00994 return;
00995
00996 *_logos << msg;
00997 }
01001 void OBFFLog(const char *msg)
01002 {
01003 if (!_logos)
01004 return;
01005
01006 *_logos << msg;
01007 }
01009
01011 // Structure Generation //
01013
01015
01016
01017 void DistanceGeometry();
01037 void SystematicRotorSearch(unsigned int geomSteps = 2500);
01055 int SystematicRotorSearchInitialize(unsigned int geomSteps = 2500);
01060 bool SystematicRotorSearchNextConformer(unsigned int geomSteps = 2500);
01081 void RandomRotorSearch(unsigned int conformers, unsigned int geomSteps = 2500);
01099 void RandomRotorSearchInitialize(unsigned int conformers, unsigned int geomSteps = 250
01104 bool RandomRotorSearchNextConformer(unsigned int geomSteps = 2500);
01126 void WeightedRotorSearch(unsigned int conformers, unsigned int geomSteps);
01127
01129 // Energy Minimization //
01131
01133
01134
01137 void SetLineSearchType(int type)
01138 {
01139 _linesearch = type;
01140 }
01144 int GetLineSearchType()
01145 {
01146 return _linesearch;
01147 }
01151 vector3 LineSearch(OBAtom *atom, vector3 &direction);
01165 double LineSearch(double *currentCoords, double *direction);
01178 double Newton2NumLineSearch(double *direction);
01184 void LineSearchTakeStep(double *origCoords, double *direction, double step);
01200 void SteepestDescent(int steps, double econv = 1e-6f, int method = OBFF_ANALYTICAL_GR
01227 void SteepestDescentInitialize(int steps = 1000, double econv = 1e-6f, int method = O
01242 bool SteepestDescentTakeNSteps(int n);
01258 void ConjugateGradients(int steps, double econv = 1e-6f, int method = OBFF_ANALYTICAL
01286 void ConjugateGradientsInitialize(int steps = 1000, double econv = 1e-6f, int method
01302 bool ConjugateGradientsTakeNSteps(int n);
01304
01306 // Molecular Dynamics //
01308
01310

forcefield.h 1146
Open Babel: API Documentation
01311
01313 void GenerateVelocities();
01333 void CorrectVelocities();
01349 void MolecularDynamicsTakeNSteps(int n, double T, double timestep = 0.001, int method
01351
01353 // Constraints //
01355
01357
01358
01361 OBFFConstraints& GetConstraints();
01365 void SetConstraints(OBFFConstraints& constraints);
01373 void SetFixAtom(int index);
01377 void UnsetFixAtom();
01386 void SetIgnoreAtom(int index);
01390 void UnsetIgnoreAtom();
01391
01393 static bool IgnoreCalculation(int a, int b);
01395 static bool IgnoreCalculation(int a, int b, int c);
01397 static bool IgnoreCalculation(int a, int b, int c, int d);
01399
01400
01402 // Validation //
01404
01406
01407
01408 bool DetectExplosion();
01410 vector3 ValidateLineSearch(OBAtom *atom, vector3 &direction);
01412 void ValidateSteepestDescent(int steps);
01414 void ValidateConjugateGradients(int steps);
01416 virtual bool Validate() { return false; }
01421 virtual bool ValidateGradients() { return false; }
01426 vector3 ValidateGradientError(vector3 &numgrad, vector3 &anagrad);
01428
01430 // Vector Analysis //
01432
01434
01435
01443 static double VectorBondDerivative(double *pos_a, double *pos_b,
01444 double *force_a, double *force_b);
01448 static double VectorDistanceDerivative(const double* const pos_i, const double* const
01449 double *force_i, double *force_j);
01451 static double VectorLengthDerivative(vector3 &a, vector3 &b);
01452
01463 static double VectorAngleDerivative(double *pos_a, double *pos_b, double *pos_c,
01464 double *force_a, double *force_b, double *force_c
01466 static double VectorAngleDerivative(vector3 &a, vector3 &b, vector3 &c);
01479 static double VectorOOPDerivative(double *pos_a, double *pos_b, double *pos_c, double
01480 double *force_a, double *force_b, double *force_c,
01482 static double VectorOOPDerivative(vector3 &a, vector3 &b, vector3 &c, vector3 &d);
01494 static double VectorTorsionDerivative(double *pos_a, double *pos_b, double *pos_c, do
01495 double *force_a, double *force_b, double *force
01497 static double VectorTorsionDerivative(vector3 &a, vector3 &b, vector3 &c, vector3 &d)
01498
01504 static void VectorSubtract(double *i, double *j, double *result)
01505 {
01506 for (unsigned int c = 0; c < 3; ++c)
01507 result[c] = i[c] - j[c];
01508 }
01509
01510 static void VectorSubtract(const double* const i, const double* const j, double *resu
01511 {

forcefield.h 1147
Open Babel: API Documentation
01512 for (unsigned int c = 0; c < 3; ++c)
01513 result[c] = i[c] - j[c];
01514 }
01515
01521 static void VectorAdd(double *i, double *j, double *result)
01522 {
01523 for (unsigned int c = 0; c < 3; ++c)
01524 result[c] = i[c] + j[c];
01525 }
01526
01532 static void VectorDivide(double *i, double n, double *result)
01533 {
01534 for (unsigned int c = 0; c < 3; ++c)
01535 result[c] = i[c] / n;
01536 }
01537
01543 static void VectorMultiply(double *i, double n, double *result)
01544 {
01545 for (unsigned int c = 0; c < 3; ++c)
01546 result[c] = i[c] * n;
01547 }
01548
01549 static void VectorMultiply(const double* const i, const double n, double *result)
01550 {
01551 for (unsigned int c = 0; c < 3; ++c)
01552 result[c] = i[c] * n;
01553 }
01554
01559 static void VectorSelfMultiply(double *i, double n)
01560 {
01561 for (unsigned int c = 0; c < 3; ++c)
01562 i[c] *= n;
01563 }
01564
01568 static void VectorNormalize(double *i)
01569 {
01570 double length = VectorLength(i);
01571 for (unsigned int c = 0; c < 3; ++c)
01572 i[c] /= length;
01573 }
01574
01579 static void VectorCopy(double *from, double *to)
01580 {
01581 for (unsigned int c = 0; c < 3; ++c)
01582 to[c] = from[c];
01583 }
01584
01589 static double VectorLength(double *i)
01590 {
01591 return sqrt( i[0]*i[0] + i[1]*i[1] + i[2]*i[2] );
01592 }
01593
01594 static double VectorDistance(double *pos_i, double *pos_j)
01595 {
01596 double ij[3];
01597 VectorSubtract(pos_i, pos_j, ij);
01598 const double rij = VectorLength(ij);
01599 return rij;
01600 }
01601
01608 static double VectorAngle(double *i, double *j, double *k);

forcefield.h 1148
Open Babel: API Documentation
01609
01617 static double VectorTorsion(double *i, double *j, double *k, double *l);
01618
01626 static double VectorOOP(double *i, double *j, double *k, double *l);
01627
01631 static void VectorClear(double *i)
01632 {
01633 for (unsigned int c = 0; c < 3; ++c)
01634 i[c] = 0.0;
01635 }
01636
01642 static double VectorDot(double *i, double *j)
01643 {
01644 double result = 0.0;
01645 // Written as a loop for vectorization
01646 // Loop will be unrolled by compiler otherwise
01647 for (unsigned int c = 0; c < 3; ++c)
01648 result += i[c]*j[c];
01649 return result;
01650 }
01651
01657 static void VectorCross(double *i, double *j, double *result)
01658 {
01659 result[0] = i[1]*j[2] - i[2]*j[1];
01660 result[1] = - i[0]*j[2] + i[2]*j[0];
01661 result[2] = i[0]*j[1] - i[1]*j[0];
01662 }
01663
01664 static void PrintVector(double *i)
01665 {
01666 std::cout << "<" << i[0] << ", " << i[1] << ", " << i[2] << ">" << std::endl;
01667 }
01669
01670 }; // class OBForceField
01671
01672 }// namespace OpenBabel
01673
01674 #endif // OB_FORCEFIELD_H
01675

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

forcefield.h 1149
Open Babel: API Documentation
• Related Pages
• Namespaces
• Classes
• Files

forcefield.h 1150
forcefield.h File Reference
Handle forcefields. More...

#include <vector>
#include <string>
#include <map>
#include <list>
#include <set>
#include <openbabel/babelconfig.h>
#include <openbabel/base.h>
#include <openbabel/mol.h>
#include <openbabel/plugin.h>
#include <openbabel/grid.h>
#include <openbabel/griddata.h>
#include <float.h>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
struct LineSearchType
The type of line search to be used for optimization -- simple or Newton numeric. More...
class OBFFParameter
Internal class for OBForceField to hold forcefield parameters. More...
class OBFFCalculation2
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.
More...
class OBFFCalculation3
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.
More...
class OBFFCalculation4
Internal class for OBForceField to hold energy and gradient calculations on specific force fields.
More...
class OBFFConstraint
Internal class for OBForceField to hold constraints. More...

forcefield.h File Reference 1151


Open Babel: API Documentation

class OBFFConstraints
Internal class for OBForceField to handle constraints. More...
class OBForceField
Base class for molecular mechanics force fields. More...

Defines
#define OBFF_LOGLVL_NONE 0
#define OBFF_LOGLVL_LOW 1
#define OBFF_LOGLVL_MEDIUM 2
#define OBFF_LOGLVL_HIGH 3
#define OBFF_ENERGY (1 << 0)
#define OBFF_EBOND (1 << 1)
#define OBFF_EANGLE (1 << 2)
#define OBFF_ESTRBND (1 << 3)
#define OBFF_ETORSION (1 << 4)
#define OBFF_EOOP (1 << 5)
#define OBFF_EVDW (1 << 6)
#define OBFF_EELECTROSTATIC (1 << 7)
#define OBFF_CONST_IGNORE (1 << 0)
#define OBFF_CONST_ATOM (1 << 1)
#define OBFF_CONST_ATOM_X (1 << 2)
#define OBFF_CONST_ATOM_Y (1 << 3)
#define OBFF_CONST_ATOM_Z (1 << 4)
#define OBFF_CONST_DISTANCE (1 << 5)
#define OBFF_CONST_ANGLE (1 << 6)
#define OBFF_CONST_TORSION (1 << 7)
#define OBFF_CONST_CHIRAL (1 << 8)
#define OBFF_NUMERICAL_GRADIENT (1 << 0)
#define OBFF_ANALYTICAL_GRADIENT (1 << 1)
#define KCAL_TO_KJ 4.1868
#define IF_OBFF_LOGLVL_LOW if(_loglvl >= OBFF_LOGLVL_LOW)
#define IF_OBFF_LOGLVL_MEDIUM if(_loglvl >= OBFF_LOGLVL_MEDIUM)
#define IF_OBFF_LOGLVL_HIGH if(_loglvl >= OBFF_LOGLVL_HIGH)

Detailed Description
Handle forcefields.

Define Documentation

#define OBFF_LOGLVL_NONE 0
no output

Referenced by OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(),
OBForceField::SystematicRotorSearchNextConformer(), and OBForceField::WeightedRotorSearch().

Classes 1152
Open Babel: API Documentation

#define OBFF_LOGLVL_LOW 1
SteepestDescent progress... (no output from Energy()).

#define OBFF_LOGLVL_MEDIUM 2
individual energy terms

#define OBFF_LOGLVL_HIGH 3
individual calculations and parameters

#define OBFF_ENERGY (1 << 0)


all terms

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_EBOND (1 << 1)


bond term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_EANGLE (1 << 2)


angle term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_ESTRBND (1 << 3)


strbnd term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_ETORSION (1 << 4)


torsion term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_EOOP (1 << 5)


oop term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_EVDW (1 << 6)

Define Documentation 1153


Open Babel: API Documentation

vdw term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_EELECTROSTATIC (1 << 7)


electrostatic term

Referenced by OBForceField::NumericalDerivative(), and OBForceField::NumericalSecondDerivative().

#define OBFF_CONST_IGNORE (1 << 0)


ignore the atom while setting up calculations

Referenced by OBFFConstraints::AddIgnore(), and OBFFConstraints::DeleteConstraint().

#define OBFF_CONST_ATOM (1 << 1)


fix the atom position

Referenced by OBFFConstraints::AddAtomConstraint(), and OBFFConstraints::DeleteConstraint().

#define OBFF_CONST_ATOM_X (1 << 2)


fix the x coordinate of the atom position

Referenced by OBFFConstraints::AddAtomXConstraint(), and OBFFConstraints::DeleteConstraint().

#define OBFF_CONST_ATOM_Y (1 << 3)


fix the y coordinate of the atom position

Referenced by OBFFConstraints::AddAtomYConstraint(), and OBFFConstraints::DeleteConstraint().

#define OBFF_CONST_ATOM_Z (1 << 4)


fix the z coordinate of the atom position

Referenced by OBFFConstraints::AddAtomZConstraint(), and OBFFConstraints::DeleteConstraint().

#define OBFF_CONST_DISTANCE (1 << 5)


constrain distance length

Referenced by OBFFConstraints::AddDistanceConstraint(), and OBFFConstraints::GetConstraintEnergy().

#define OBFF_CONST_ANGLE (1 << 6)


constrain angle

Define Documentation 1154


Open Babel: API Documentation

Referenced by OBFFConstraints::AddAngleConstraint(), and OBFFConstraints::GetConstraintEnergy().

#define OBFF_CONST_TORSION (1 << 7)


constrain torsion

Referenced by OBFFConstraints::AddTorsionConstraint(), and OBFFConstraints::GetConstraintEnergy().

#define OBFF_CONST_CHIRAL (1 << 8)


constrain chiral volume

#define OBFF_NUMERICAL_GRADIENT (1 << 0)


use numerical gradients

#define OBFF_ANALYTICAL_GRADIENT (1 << 1)


use analytical gradients

#define KCAL_TO_KJ 4.1868

Referenced by OBForceField::CorrectVelocities(), OBForceField::GenerateVelocities(), and


OBForceField::MolecularDynamicsTakeNSteps().

#define IF_OBFF_LOGLVL_LOW if(_loglvl >= OBFF_LOGLVL_LOW)

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(),
OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(),
OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBForceField::SteepestDescentInitialize(),
OBForceField::SteepestDescentTakeNSteps(), OBForceField::SystematicRotorSearchInitialize(),
OBForceField::SystematicRotorSearchNextConformer(), OBForceField::ValidateConjugateGradients(),
OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

#define IF_OBFF_LOGLVL_MEDIUM if(_loglvl >= OBFF_LOGLVL_MEDIUM)

#define IF_OBFF_LOGLVL_HIGH if(_loglvl >= OBFF_LOGLVL_HIGH)

Referenced by OBForceField::WeightedRotorSearch().

Define Documentation 1155


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

Define Documentation 1156


format.cpp File Reference
Base class OBFormat for file formats. More...

#include <openbabel/babelconfig.h>
#include <openbabel/format.h>
#include <typeinfo>

Namespaces
namespace OpenBabel

Detailed Description
Base class OBFormat for file formats.

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

format.cpp File Reference 1157


format.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 obconversion.cpp - Declarations for OBFormat
00003
00004 Copyright (C) 2004-2007 by Chris Morley
00005 Some portions Copyright (C) 2005-2007 by Geoffrey 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 #ifndef OB_FORMAT_H
00020 #define OB_FORMAT_H
00021 #include <openbabel/babelconfig.h>
00022 #include <openbabel/plugin.h>
00023
00024 namespace OpenBabel
00025 {
00026 class OBBase;
00027 class OBConversion;
00028
00030 #define NOTREADABLE 0x01
00031 #define READONEONLY 0x02
00032 #define READBINARY 0x04
00033 #define ZEROATOMSOK 0x08
00034 #define NOTWRITABLE 0x10
00035 #define WRITEONEONLY 0x20
00036 #define WRITEBINARY 0x40
00037 #define READXML 0x80
00038 #define DEFAULTFORMAT 0x4000
00039
00041 // class introduction in obconversion.cpp
00042 class OBCONV OBFormat : public OBPlugin
00043 {
00044 //Macro to include functions to handle plugin operations
00045 MAKE_PLUGIN(OBFormat);
00046
00047 public:
00048
00050 OBFormat(){}
00051
00052 const char* TypeID(){ return "formats"; }
00053
00055
00059 virtual bool ReadMolecule(OBBase* /*pOb*/, OBConversion* /*pConv*/)
00060 { std::cerr << "Not a valid input format"; return false;}
00061
00063

format.h 1158
Open Babel: API Documentation
00067 virtual bool ReadChemObject(OBConversion* /*pConv*/)
00068 { std::cerr << "Not a valid input format"; return false;}
00069
00071
00076 virtual bool WriteMolecule(OBBase* /*pOb*/, OBConversion* /*pConv*/)
00077 { std::cerr << "Not a valid output format"; return false;}
00078
00080
00084 virtual bool WriteChemObject(OBConversion* /*pConv*/)
00085 { std::cerr << "Not a valid output format"; return false;}
00086
00088
00092 virtual const char* Description()=0;
00093
00095
00097 virtual const char* TargetClassDescription();
00098
00100
00103 virtual const std::type_info& GetType();
00104
00106 virtual const char* SpecificationURL() { return ""; }
00107
00109 const char* GetMIMEType() { return pMime; }
00110
00112
00116 virtual unsigned int Flags() { return 0;};
00117
00119
00121 virtual int SkipObjects(int /*n*/, OBConversion* /*pConv*/)
00122 {
00123 return 0; //shows not implemented in the format class
00124 };
00125
00127
00131 virtual OBFormat* MakeNewInstance()
00132 {
00133 return NULL; //shows not implemented in the format class
00134 }
00135
00136 //New functions since OBFormat is derived from OBPlugin
00137 //\brief Called from, and an alternative to, OBConversion::RegisterFormat();
00138 int RegisterFormat(const char* ID, const char* MIME = NULL);
00139
00144 virtual bool Display(std::string& txt, const char* param, const char* ID=NULL);
00145
00146 static OBFormat* FormatFromMIME(const char* MIME);
00147
00148 private:
00149 static PluginMapType &FormatsMIMEMap()
00150 {
00151 static PluginMapType m;
00152 return m;
00153 }
00154
00155 const char* pMime;
00156
00157 /* Functions provided by the MAKE_PLUGIN macro
00158
00160 Not currently used for formats
00161 OBFormat(const char* ID, bool IsDefault=false);
00162

format.h 1159
Open Babel: API Documentation
00164 static OBFormat* FindType(const char* ID);
00165
00166 */};
00167
00168 }//namespace
00169 #endif
00170

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

format.h 1160
format.h File Reference
Declarations for OBFormat. More...

#include <openbabel/babelconfig.h>
#include <openbabel/plugin.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 OBFormat
Base class for file formats. More...

Defines
#define NOTREADABLE 0x01
#define READONEONLY 0x02
#define READBINARY 0x04
#define ZEROATOMSOK 0x08
#define NOTWRITABLE 0x10
#define WRITEONEONLY 0x20
#define WRITEBINARY 0x40
#define READXML 0x80
#define DEFAULTFORMAT 0x4000

format.h File Reference 1161


Open Babel: API Documentation

Detailed Description
Declarations for OBFormat.

Define Documentation

#define NOTREADABLE 0x01


For OBFormat::Flags().

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(), and OBConversion::SetInFormat().

#define READONEONLY 0x02

Referenced by OBConversion::Convert().

#define READBINARY 0x04

Referenced by OBConversion::InstallStreamFilter(), OBConversion::OpenAndSetFormat(), and


OBConversion::ReadFile().

#define ZEROATOMSOK 0x08

Referenced by OBMoleculeFormat::ReadChemObjectImpl().

#define NOTWRITABLE 0x10

Referenced by OBFormat::Display(), OBConversion::GetNextFormat(), and OBConversion::SetOutFormat().

#define WRITEONEONLY 0x20

Referenced by OBConversion::AddChemObject().

#define WRITEBINARY 0x40

Referenced by OBConversion::FullConvert(), and OBConversion::WriteFile().

#define READXML 0x80

Referenced by OBConversion::InstallStreamFilter().

Detailed Description 1162


Open Babel: API Documentation

#define DEFAULTFORMAT 0x4000

Referenced by OBFormat::RegisterFormat().

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j

Define Documentation 1163


Open Babel: API Documentation
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-_-

• _a : OBFFParameter , OBUnitCell , OBInternalCoord


• _aakey : OBResidue
• _ads : OBTorsion
• _alias : AliasData
• _alpha : OBUnitCell
• _ang : OBInternalCoord
• _angles : OBAngleData
• _atom4refc : OBChiralData
• _atom4refo : OBChiralData
• _atom4refs : OBChiralData
• _atomid : OBResidue
• _atoms : OBResidue
• _attr : OBGenericData
• _autoFormalCharge : OBMol
• _autoPartialCharge : OBMol
• _b : OBFFParameter , OBUnitCell , OBInternalCoord
• _bc : OBTorsion
• _beta : OBUnitCell
• _bgn : OBBond , OBVirtualBond
• _c : OBAtom , OBFFParameter , OBUnitCell , OBInternalCoord , OBMol
• _chain : OBResidue
• _cidx : OBAtom
• _constraints : OBForceField
• _cstep : OBForceField
• _current_conformer : OBForceField
• _cutoff : OBForceField
• _d : OBFFParameter
• _data : OBCommentData
• _dataptr : OBGlobalDataBase

-_- 1164
Open Babel: API Documentation
• _dimension : OBMol
• _dir : OBGlobalDataBase
• _dpar : OBFFParameter
• _dst : OBInternalCoord
• _e_n1 : OBForceField
• _econv : OBForceField
• _ele : OBAtom
• _elepairs : OBForceField
• _embedlevel : XMLBaseFormat
• _end : OBBond , OBVirtualBond
• _energies : OBForceField
• _energy : OBMol
• _envvar : OBGlobalDataBase
• _errorMsg : OBError
• _expandedatoms : AliasData
• _explanation : OBError
• _fcharge : OBAtom
• _filename : OBGlobalDataBase
• _filterStreamBuf : OBMessageHandler
• _fixAtom : OBForceField
• _flags : OBAtom , OBBond , OBMol
• _gamma : OBUnitCell
• _grad1 : OBForceField
• _gradientPtr : OBForceField
• _gridtype : OBProxGrid
• _growbond : OBSmartsPattern
• _halfSpace : OBFloatGrid
• _hetatm : OBResidue
• _hyb : OBAtom
• _id : OBPlugin
• _idx : OBAtom , OBBond , OBResidue
• _ignoreAtom : OBForceField
• _impval : OBAtom
• _inc : OBProxGrid
• _init : OBGlobalDataBase , OBForceField
• _interGroup : OBForceField
• _interGroups : OBForceField
• _internals : OBMol
• _intraGroup : OBForceField
• _inv_spa : OBFloatGrid
• _inWrapStreamBuf : OBMessageHandler
• _ipar : OBFFParameter
• _isotope : OBAtom
• _ival : OBFloatGrid
• _lattice : OBUnitCell
• _level : OBError
• _linesearch : OBForceField
• _logbuf : OBForceField
• _logging : OBMessageHandler
• _loglvl : OBForceField
• _logos : OBForceField

-_- 1165
Open Babel: API Documentation
• _map : OBAtomClassData , OBSSMatch
• _matrix : OBMatrixData
• _maxEntries : OBMessageHandler
• _maxinc : OBProxGrid
• _messageCount : OBMessageHandler
• _messageList : OBMessageHandler
• _method : OBError
• _midx : OBFloatGrid
• _midy : OBFloatGrid
• _midz : OBFloatGrid
• _mlist : OBSmartsPattern
• _mod : OBMol
• _mol : OBForceField , OBSSMatch
• _natoms : OBMol
• _nbonds : OBMol
• _ncoords : OBForceField
• _nsteps : OBForceField
• _nxinc : OBProxGrid
• _nyinc : OBProxGrid
• _nzinc : OBProxGrid
• _offset : OBUnitCell
• _ord : OBVirtualBond
• _order : OBBond
• _origLogLevel : OBForceField
• _outputLevel : OBMessageHandler
• _outputStream : OBMessageHandler
• _pairfreq : OBForceField
• _parent : OBAtom , OBBond
• _parFile : OBForceField
• _pat : OBSmartsPattern , OBSSMatch
• _path : OBRing
• _pathset : OBRing
• _pcharge : OBAtom
• _pmol : XMLMoleculeFormat
• _pointGroup : OBSymmetryData
• _possibleCause : OBError
• _prefix : XMLBaseFormat
• _pxmlConv : XMLBaseFormat
• _radians : OBAngle
• _rele : OBForceField
• _residue : OBAtom , OBMol
• _reskey : OBResidue
• _resname : OBResidue
• _resnum : OBResidue
• _rvdw : OBForceField
• _serialMap : OBSerialNums
• _sernum : OBResidue
• _SkipNextRead : XMLConversion
• _source : OBGenericData
• _spaceGroup : OBUnitCell , OBSymmetryData
• _spaceGroupName : OBUnitCell

-_- 1166
Open Babel: API Documentation
• _spacing : OBFloatGrid
• _spinmultiplicity : OBAtom
• _stereo : OBVirtualBond
• _str : OBSmartsPattern
• _subdir : OBGlobalDataBase
• _suggestedRemedy : OBError
• _temp : OBForceField
• _termini : OBAngle
• _timestep : OBForceField
• _title : OBMol
• _tor : OBInternalCoord
• _torsions : OBTorsionData
• _totalCharge : OBMol
• _totalSpin : OBMol
• _type : OBGenericData , OBAtom
• _uatoms : OBSSMatch
• _v : OBAtom
• _v1 : OBUnitCell
• _v2 : OBUnitCell
• _v3 : OBUnitCell
• _validSetup : OBForceField
• _value : OBPairData , OBPairTemplate
• _values : OBFloatGrid
• _vatom : OBMol
• _vbond : OBAtom , OBMol
• _vconf : OBMol
• _vdata : OBSetData
• _vData : OBConformerData
• _vdata : OBBase
• _vDimension : OBConformerData
• _vDisplace : OBConformerData
• _vdwpairs : OBForceField
• _vec : OBVectorData
• _velocityPtr : OBForceField
• _vEnergies : OBConformerData
• _vertex : OBAngle
• _vexbnd : OBExternalBondData
• _vForces : OBConformerData
• _vFrequencies : OBVibrationData
• _vIntensities : OBVibrationData
• _vLx : OBVibrationData
• _vr : OBRingData
• _vVelocity : OBConformerData
• _xAxis : OBFloatGrid
• _xdim : OBFloatGrid
• _xmax : OBGrid
• _xmin : OBGrid
• _yAxis : OBFloatGrid
• _ydim : OBFloatGrid
• _ymax : OBGrid
• _ymin : OBGrid

-_- 1167
Open Babel: API Documentation

• _zAxis : OBFloatGrid
• _zdim : OBFloatGrid
• _zmax : OBGrid
• _zmin : OBGrid

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j

-_- 1168
Open Babel: API Documentation
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-j-

• jacobi() : matrix3x3

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

-j- 1169
Open Babel: API Documentation
• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-k-

• KBOSum() : OBAtom
• Kekulize() : OBMol

-k- 1170
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-k- 1171
Open Babel: API Documentation
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-l-

• Lap() : OBStopwatch
• LatticeType : OBUnitCell
• leaf : _BondExpr , _AtomExpr
• length() : vector3
• length_2() : vector3
• LErdbuf : OBConversion
• lft : _AtomExpr , _BondExpr
• LINDERMANN : OBRateData
• LINEAR : OBRotationData
• LineSearch() : OBForceField
• LineSearchTakeStep() : OBForceField
• LipoGrid() : OBProxGrid
• List() : OBPlugin
• ListAsString() : OBPlugin
• ListAsVector() : OBPlugin
• lo : DoubleType
• LoadFormatFiles() : OBConversion
• LoadFragments() : OBBuilder
• LookForNamespace() : XMLConversion
• LookupBO() : OBResidueData
• LookupType() : OBResidueData
• LoRates : OBRateData
• LoT : OBNasaThermoData

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

-l- 1172
Open Babel: API Documentation

• Related Pages
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-l- 1173
Open Babel: API Documentation

-m-

• m_IsFirstInput : OBConversion
• m_IsLast : OBConversion
• MakeCombinedMolecule() : OBMoleculeFormat
• MakeInstance() : OBGroupContrib , OpTransform , OBPlugin
• MakeNewInstance() : OBFormat , OBForceField
• Match() : OBSmartsPattern , OBSSMatch
• MatchesSMARTS() : OBAtom
• MatchPairData() : OBDescriptor
• matrix3x3() : matrix3x3
• MemberOfRingCount() : OBAtom
• MemberOfRingSize() : OBAtom
• message() : OBError
• MidT : OBNasaThermoData
• MolecularDynamicsTakeNSteps() : OBForceField
• mon : _BondExpr , _AtomExpr
• Monoclinic : OBUnitCell
• MoreFilesToCome : OBConversion

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

• All
• Functions
• Variables

-m- 1174
Open Babel: API Documentation
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-n-

• n : OBRateData
• NameIndexType : OBMoleculeFormat
• Namespaces() : XMLConversion
• NamespaceURI() : XMLBaseFormat
• NeedToFreeInStream : OBConversion
• NeedToFreeOutStream : OBConversion
• Negate() : OBBitVec
• nEntries : FptIndexHeader
• NewAtom() : OBMol
• NewBond() : OBMol
• NewPerceiveKekuleBonds() : OBMol
• NewResidue() : OBAtom , OBMol
• Newton2Num : LineSearchType

-n- 1175
Open Babel: API Documentation
• Newton2NumLineSearch() : OBForceField
• next() : OBMolAtomDFSIter
• Next() : OBRotorKeys
• NextAtom() : OBMol , OBResidue
• NextBit() : OBBitVec
• NextBond() : OBAtom , OBMol
• NextConformer() : OBMol
• NextFloat() : OBRandom
• NextInt() : OBRandom
• NextInternalCoord() : OBMol
• NextNbrAtom() : OBAtom
• NextResidue() : OBMol
• NextRing() : OBRingData
• NextRotor() : OBRotorList
• NextTransform() : SpaceGroup
• normalize() : vector3
• Normalize() : transform3d
• nsdecl : XMLBaseFormat
• NsMapType : XMLConversion
• NumAtoms() : OBMol , OBSmartsPattern , OBRotamerList
• NumBaseCoordinateSets() : OBRotamerList
• NumBonds() : OBMol , OBSmartsPattern
• NumConformers() : OBMol
• NumericalDerivative() : OBForceField
• NumericalSecondDerivative() : OBForceField
• NumHvyAtoms() : OBMol
• NumKeys() : OBRotorKeys
• NumMatches() : OBSmartsPattern
• NumProducts() : OBReaction
• NumReactants() : OBReaction
• NumResidues() : OBMol
• NumRotamers() : OBRotamerList
• NumRotors() : OBRotamerList , OBMol

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

-n- 1176
Open Babel: API Documentation

• Related Pages
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-n- 1177
Open Babel: API Documentation

-o-

• OBAngle() : OBAngle
• OBAngleData : OBAngle , OBAngleData
• OBAromaticTyper() : OBAromaticTyper
• OBAtom : OBChiralData , OBAtom
• OBAtomAtomIter() : OBAtomAtomIter
• OBAtomBondIter() : OBAtomBondIter
• OBAtomClassData() : OBAtomClassData
• OBAtomTyper() : OBAtomTyper
• OBBitVec() : OBBitVec
• OBBond() : OBBond
• OBBondTyper() : OBBondTyper
• OBChainsParser() : OBChainsParser
• OBChemTsfm() : OBChemTsfm
• OBChiralData() : OBChiralData
• OBCommentData() : OBCommentData
• OBConformerData() : OBConformerData
• OBConversion() : OBConversion
• OBElement() : OBElement
• OBElementTable() : OBElementTable
• OBError() : OBError
• OBExternalBond() : OBExternalBond
• OBExternalBondData() : OBExternalBondData
• OBFFConstraint() : OBFFConstraint
• OBFFConstraints() : OBFFConstraints
• OBFFLog() : OBForceField
• OBFloatGrid() : OBFloatGrid
• OBFormat() : OBFormat
• OBGastChrg() : OBGastChrg
• OBGenericData() : OBGenericData
• OBGlobalDataBase() : OBGlobalDataBase
• OBGrid() : OBGrid
• OBGridData() : OBGridData
• OBGroupContrib() : OBGroupContrib
• OBInternalCoord() : OBInternalCoord
• OBIsotopeTable() : OBIsotopeTable
• OBLocale() : OBLocale
• OBMatrixData() : OBMatrixData
• OBMessageHandler() : OBMessageHandler
• OBMol : OBChiralData , OBMol , OBTorsion , OBTorsionData , OBAngle , OBAngleData
• OBMolAngleIter() : OBMolAngleIter
• OBMolAtomBFSIter() : OBMolAtomBFSIter
• OBMolAtomDFSIter() : OBMolAtomDFSIter
• OBMolAtomIter() : OBMolAtomIter
• OBMolBondIter() : OBMolBondIter
• OBMoleculeFormat() : OBMoleculeFormat
• OBMolPairIter() : OBMolPairIter
• OBMolRingIter() : OBMolRingIter
• OBMolTorsionIter() : OBMolTorsionIter
• OBNasaThermoData() : OBNasaThermoData

-o- 1178
Open Babel: API Documentation
• OBPairData() : OBPairData
• OBPairTemplate() : OBPairTemplate
• OBPhModel() : OBPhModel
• OBPointGroup() : OBPointGroup
• OBProxGrid() : OBProxGrid
• OBRandom() : OBRandom
• OBRateData() : OBRateData
• OBReaction() : OBReaction
• OBResidue() : OBResidue
• OBResidueAtomIter() : OBResidueAtomIter
• OBResidueData() : OBResidueData
• OBResidueIter() : OBResidueIter
• OBRing() : OBRing
• OBRingData() : OBRingData
• OBRingSearch() : OBRingSearch
• OBRingTyper() : OBRingTyper
• OBRotamerList() : OBRotamerList
• OBRotationData() : OBRotationData
• OBRotor() : OBRotor
• OBRotorKeys() : OBRotorKeys
• OBRotorList() : OBRotorList
• OBRotorRule() : OBRotorRule
• OBRotorRules() : OBRotorRules
• OBRTree() : OBRTree
• OBScoreGrid() : OBScoreGrid
• OBSerialNums() : OBSerialNums
• OBSetData() : OBSetData
• OBSmartsPattern() : OBSmartsPattern
• OBSqrtTbl() : OBSqrtTbl
• OBSSMatch() : OBSSMatch
• OBSymmetryData() : OBSymmetryData
• OBTorsion() : OBTorsion
• OBTorsionData : OBTorsion , OBTorsionData
• OBTypeTable() : OBTypeTable
• OBUnitCell() : OBUnitCell
• OBVectorData() : OBVectorData
• OBVibrationData() : OBVibrationData
• OBVirtualBond() : OBVirtualBond
• OneObjectOnly : OBConversion
• OPAMapType : OBConversion
• OpenAndSetFormat() : OBConversion
• OpenInAndOutFiles() : OBConversion
• openLib() : DLHandler
• operator & : OBBitVec
• operator &=() : OBBitVec
• operator bool() : OBMolAngleIter , OBAtomAtomIter , OBMolAtomIter , OBMolAtomDFSIter ,
OBMolAtomBFSIter , OBMolBondIter , OBAtomBondIter , OBResidueIter , OBResidueAtomIter ,
OBMolTorsionIter , OBMolPairIter , OBMolRingIter
• operator!=() : SpaceGroup , vector3
• operator()() : LineEndingExtractor , CharPtrLess , matrix3x3

-o- 1179
Open Babel: API Documentation
• operator*() : OBMolAtomIter , OBMolAtomDFSIter , OBMolBondIter , OBAtomAtomIter ,
OBAtomBondIter , transform3d , OBResidueAtomIter , OBMolAngleIter , OBMolTorsionIter ,
OBMolPairIter , OBMolRingIter , matrix3x3 , transform3d , OBResidueIter , OBMolAtomBFSIter
• operator*=() : matrix3x3 , vector3
• operator++() : OBAtomBondIter , OBMolPairIter , OBMolBondIter , OBAtomBondIter ,
OBMolTorsionIter , OBResidueIter , OBAtomAtomIter , OBMolAtomDFSIter , OBAtomAtomIter ,
OBMolAtomIter , OBMolAtomBFSIter , OBMolBondIter , OBMolAtomDFSIter , OBResidueIter ,
OBResidueAtomIter , OBMolAngleIter , OBMolRingIter , OBResidueAtomIter , OBMolRingIter
• operator+=() : vector3 , OBBitVec , OBMol , vector3
• operator- : OBBitVec
• operator-=() : vector3 , OBBitVec , vector3
• operator->() : OBMolRingIter , OBAtomAtomIter , OBAtomBondIter , OBResidueIter ,
OBMolAtomIter , OBMolAtomBFSIter , OBMolAtomDFSIter , OBMolBondIter ,
OBResidueAtomIter
• operator/=() : matrix3x3 , vector3
• operator< : OBBitVec
• operator<< : OBBitVec , OBError , OBFloatGrid , matrix3x3
• operator=() : OBAtom , OBMolAtomBFSIter , OBSmartsPattern , OBFFParameter ,
OBAtomBondIter , OBConformerData , OBResidueAtomIter , OBResidue , OBRing ,
OBVibrationData , OBRingData , OBMolBondIter , OBMolTorsionIter , OBMolAtomDFSIter ,
OBSymmetryData , OBMol , OBMolAngleIter , OBResidueIter , OBMolPairIter , OBFFConstraints ,
vector3 , OBAtomAtomIter , OBChiralData , OBTorsionData , OBAngle , OBUnitCell ,
OBMolAtomIter , OBBitVec , OBMolRingIter , OBCommentData , OBAngleData , OBTorsion
• operator== : OBBitVec , vector3 , OBError , OBAngle , SpaceGroup
• operator>> : OBFloatGrid , OBBitVec
• operator[]() : vector3 , OBBitVec
• operator^ : OBBitVec
• operator^=() : OBBitVec
• operator| : OBBitVec
• operator|=() : OBBitVec
• OpMap : OBOp
• OpOptions() : OBOp
• Option_type : OBConversion
• OptionParamArray() : OBConversion
• OptionsArray : OBConversion
• OpTransform() : OpTransform
• Orthorhombic : OBUnitCell
• OTHER : OBGridData
• OUTOPTIONS : OBConversion
• OutputDeferredMols() : OBMoleculeFormat
• OutputToStream() : XMLConversion , XMLBaseFormat
• overflow() : FilteringInputStreambuf

-o- 1180
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-o- 1181
Open Babel: API Documentation

•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-z-

• z() : OBAtom , vector3

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c

-z- 1182
Open Babel: API Documentation
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-~-

• ~FastSearch() : FastSearch
• ~FastSearchIndexer() : FastSearchIndexer
• ~FilteringInputStreambuf() : FilteringInputStreambuf
• ~GasteigerState() : GasteigerState
• ~matrix3x3() : matrix3x3
• ~OBAngle() : OBAngle
• ~OBAromaticTyper() : OBAromaticTyper
• ~OBAtom() : OBAtom
• ~OBAtomAtomIter() : OBAtomAtomIter
• ~OBAtomBondIter() : OBAtomBondIter
• ~OBAtomTyper() : OBAtomTyper
• ~OBBase() : OBBase
• ~OBBond() : OBBond
• ~OBBondTyper() : OBBondTyper
• ~OBChainsParser() : OBChainsParser
• ~OBChemTsfm() : OBChemTsfm
• ~OBChiralData() : OBChiralData
• ~OBConformerData() : OBConformerData
• ~OBConversion() : OBConversion
• ~OBElementTable() : OBElementTable
• ~OBExternalBond() : OBExternalBond
• ~OBFFCalculation2() : OBFFCalculation2

-~- 1183
Open Babel: API Documentation
• ~OBFFCalculation3() : OBFFCalculation3
• ~OBFFCalculation4() : OBFFCalculation4
• ~OBFFConstraint() : OBFFConstraint
• ~OBFFConstraints() : OBFFConstraints
• ~OBFingerprint() : OBFingerprint
• ~OBFloatGrid() : OBFloatGrid
• ~OBForceField() : OBForceField
• ~OBGastChrg() : OBGastChrg
• ~OBGenericData() : OBGenericData
• ~OBGlobalDataBase() : OBGlobalDataBase
• ~OBGridData() : OBGridData
• ~OBIsotopeTable() : OBIsotopeTable
• ~OBLocale() : OBLocale
• ~obLogBuf() : obLogBuf
• ~OBMatrixData() : OBMatrixData
• ~OBMessageHandler() : OBMessageHandler
• ~OBMol() : OBMol
• ~OBMolAngleIter() : OBMolAngleIter
• ~OBMolAtomBFSIter() : OBMolAtomBFSIter
• ~OBMolAtomDFSIter() : OBMolAtomDFSIter
• ~OBMolAtomIter() : OBMolAtomIter
• ~OBMolBondIter() : OBMolBondIter
• ~OBMolPairIter() : OBMolPairIter
• ~OBMolRingIter() : OBMolRingIter
• ~OBMolTorsionIter() : OBMolTorsionIter
• ~OBPhModel() : OBPhModel
• ~OBPlugin() : OBPlugin
• ~OBPointGroup() : OBPointGroup
• ~OBProxGrid() : OBProxGrid
• ~OBResidue() : OBResidue
• ~OBResidueAtomIter() : OBResidueAtomIter
• ~OBResidueIter() : OBResidueIter
• ~OBRingData() : OBRingData
• ~OBRingSearch() : OBRingSearch
• ~OBRingTyper() : OBRingTyper
• ~OBRotamerList() : OBRotamerList
• ~OBRotationData() : OBRotationData
• ~OBRotor() : OBRotor
• ~OBRotorList() : OBRotorList
• ~OBRotorRule() : OBRotorRule
• ~OBRotorRules() : OBRotorRules
• ~OBRTree() : OBRTree
• ~OBScoreGrid() : OBScoreGrid
• ~OBSmartsPattern() : OBSmartsPattern
• ~OBSqrtTbl() : OBSqrtTbl
• ~OBSSMatch() : OBSSMatch
• ~OBSymmetryData() : OBSymmetryData
• ~OBTorsion() : OBTorsion
• ~OBTypeTable() : OBTypeTable
• ~OBUnitCell() : OBUnitCell
• ~OBVectorData() : OBVectorData

-~- 1184
Open Babel: API Documentation
• ~OBVibrationData() : OBVibrationData
• ~OpTransform() : OpTransform
• ~patty() : patty
• ~SpaceGroup() : SpaceGroup
• ~vector3() : vector3
• ~XMLBaseFormat() : XMLBaseFormat
• ~XMLConversion() : XMLConversion
• ~XMLMoleculeFormat() : XMLMoleculeFormat

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f

-~- 1185
Open Babel: API Documentation
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-a-

• A : OBRateData
• a : OBFFParameter , OBFFConstraint , GasteigerState , OBFFCalculation2
• aalloc : Pattern
• acount : Pattern
• Add() : OBAtomClassData , FastSearchIndexer
• AddAgent() : OBReaction
• AddAngleConstraint() : OBFFConstraints
• AddAtom() : OBMol , OBResidue
• AddAtomConstraint() : OBFFConstraints
• AddAtomRef() : OBChiralData
• AddAtomXConstraint() : OBFFConstraints
• AddAtomYConstraint() : OBFFConstraints
• AddAtomZConstraint() : OBFFConstraints
• AddBond() : OBAtom , OBMol
• AddChemObject() : OBConversion
• AddConformer() : OBMol
• AddData() : OBSetData
• AddDistanceConstraint() : OBFFConstraints
• AddGradient() : OBForceField
• AddHydrogens() : OBMol
• AddIgnore() : OBFFConstraints
• AddInterGroup() : OBForceField
• AddInterGroups() : OBForceField
• AddIntraGroup() : OBForceField
• AddNbrs() : OBBuilder

-a- 1186
Open Babel: API Documentation
• AddOption() : OBConversion
• AddPolarHydrogens() : OBMol
• AddProduct() : OBReaction
• AddProperties() : OBDescriptor
• AddReactant() : OBReaction
• AddResidue() : OBAtom , OBMol
• AddRingFromClosure() : OBRingSearch
• AddRotamer() : OBRotamerList
• AddRotamers() : OBRotamerList
• AddRotor() : OBRotorKeys
• AddTorsion() : OBTorsion
• AddTorsionConstraint() : OBFFConstraints
• AddTransform() : SpaceGroup
• AliasData() : AliasData
• Align() : OBMol
• ALL : OBConversion
• ANGSTROM : OBGridData
• Apply() : OBChemTsfm
• arg : _BondExpr , _AtomExpr
• ARRHENIUS : OBRateData
• AsArray() : vector3
• assign_rules() : patty
• assign_types() : patty
• AssignAromaticFlags() : OBAromaticTyper
• AssignBonds() : OBResidueData
• AssignFunctionalGroupBonds() : OBBondTyper
• AssignHyb() : OBAtomTyper
• AssignImplicitValence() : OBAtomTyper
• AssignPartialCharges() : OBGastChrg
• AssignSeedPartialCharge() : OBPhModel
• AssignSpinMultiplicity() : OBMol
• AssignTorVals() : OBRotorList
• AssignTypes() : OBAtomTyper , OBRingTyper
• ASYMMETRIC : OBRotationData
• atom : Pattern
• AutomaticFormalCharge() : OBMol
• AutomaticPartialCharge() : OBMol
• AverageBondAngle() : OBAtom

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

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

-a- 1187
Open Babel: API Documentation

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z

-a- 1188
Open Babel: API Documentation
•~

Here is a list of all class members with links to the classes they belong to:

-b-

• b : OBFFParameter , OBFFCalculation2 , GasteigerState , OBFFConstraint


• balloc : Pattern
• BaseFindType() : OBPlugin
• baseindent : XMLBaseFormat
• BatchFileName() : OBConversion
• bcount : Pattern
• Begin() : OBPlugin
• BeginAtom() : OBMol , OBResidue
• BeginAtoms() : OBMol , OBResidue
• BeginBond() : OBMol , OBAtom
• BeginBonds() : OBAtom , OBMol
• BeginConformer() : OBMol
• BeginData() : OBBase
• BeginInternalCoord() : OBMol
• BeginMList() : OBSmartsPattern
• BeginModify() : OBMol
• BeginNbrAtom() : OBAtom
• BeginResidue() : OBMol
• BeginResidues() : OBMol
• BeginRing() : OBRingData
• BeginRings() : OBRingData , OBRingSearch
• BeginRotamer() : OBRotamerList
• BeginRotor() : OBRotorList
• BeginRotors() : OBRotorList
• BeginTorIncrement() : OBRotor
• BeginTransform() : SpaceGroup
• bin : _BondExpr , _AtomExpr
• BitIsOn() : OBBitVec
• BitIsSet() : OBBitVec
• BOHR : OBGridData
• bond : Pattern
• BOSum() : OBAtom
• Build() : OBBuilder

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

-b- 1189
Open Babel: API Documentation

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y

-b- 1190
Open Babel: API Documentation

•z
•~

Here is a list of all class members with links to the classes they belong to:

-c-

• c : OBFFParameter , OBFFCalculation3 , GasteigerState , OBFFConstraint


• CalcBondLength() : OBRotor
• CalcTorsion() : OBRotor
• CanBeNormalized() : vector3
• CastAndClear() : OBBase
• cell : OBProxGrid
• Center() : OBFloatGrid , OBScoreGrid , OBMol
• CenterMol() : OBScoreGrid
• CheckAromaticity() : OBAromaticTyper
• CheckedForGzip : OBConversion
• CheckForUnintendedBatch() : OBConversion
• CheckFP() : FptIndex
• chi : GasteigerState
• chiral_flag : AtomSpec
• ClassDescription() : OBBase , OBMol , OBReaction
• Clear() : OBAngleData , OBChiralData , OBScoreGrid , OBMol , OBResidue , OBRotorList ,
OBRotorKeys
• clear() : OBFFParameter
• Clear() : OBAtom , OBAtomClassData , OBBase , OBBitVec , OBFFConstraints , OBTorsion ,
OBTorsionData , OBAngle
• ClearBond() : OBAtom
• ClearCoordPtr() : OBAtom
• ClearGradients() : OBForceField
• ClearGroups() : OBForceField
• ClearLog() : OBMessageHandler
• Clone() : OBMatrixData , OBRateData , OBVectorData , OBNasaThermoData , OBRotamerList ,
AliasData , OBChiralData , OBAtomClassData , OBGenericData , OBCommentData ,
OBConformerData , OBExternalBondData , OBPairData , OBSetData , OBVirtualBond ,
OBRingData , OBUnitCell , OBSymmetryData , OBTorsionData , OBAngleData , OBSerialNums ,
OBVibrationData , OBRotationData
• CloneData() : OBBase
• CloseOutFile() : OBConversion
• Coeffs : OBNasaThermoData
• Compare() : OBDescriptor
• CompareStringWithFilter() : OBDescriptor
• Config() : OBScoreGrid
• ConjugateGradients() : OBForceField
• ConjugateGradientsInitialize() : OBForceField
• ConjugateGradientsTakeNSteps() : OBForceField
• Connect() : OBBuilder
• ConnectTheDots() : OBMol
• constraint_value : OBFFConstraint
• ContigFragList() : OBMol
• Convert() : OBConversion

-c- 1191
Open Babel: API Documentation
• ConvertDativeBonds() : OBMol
• CoordsToIndex() : OBFloatGrid
• CopyConformer() : OBMol
• CopyOptions() : OBConversion
• CorrectAromaticNitrogens() : OBAtomTyper
• CorrectedBondRad() : OBElementTable
• CorrectedVdwRad() : OBElementTable
• CorrectForPH() : OBPhModel , OBMol
• CorrectStereoAtoms() : OBBuilder
• CorrectStereoBonds() : OBBuilder
• CorrectVelocities() : OBForceField
• Count : OBConversion
• CountBits() : OBBitVec
• CountBondsOfOrder() : OBAtom
• CountFreeOxygens() : OBAtom
• CountRingBonds() : OBAtom
• CreateAtom() : OBMol
• CreateBond() : OBMol
• CreateConformerList() : OBRotamerList
• createOrthoVector() : vector3
• CreateResidue() : OBMol
• Cubic : OBUnitCell
• CurrentDepth() : OBMolAtomBFSIter

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

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

-c- 1192
Open Babel: API Documentation
• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-d-

• d : OBFFParameter , OBFFCalculation4 , OBLocale , OBPointGroup , OBFFConstraint


• datafilename : FptIndexHeader
• DataSize() : OBBase
• debug_off() : patty
• debug_on() : patty
• DecrementImplicitValence() : OBAtom
• DecrementMod() : OBMol
• DeferMolOutput() : OBMoleculeFormat
• DeleteAtom() : OBMol
• DeleteBond() : OBAtom , OBMol

-d- 1193
Open Babel: API Documentation
• DeleteConformer() : OBMol
• DeleteConstraint() : OBFFConstraints
• DeleteData() : OBBase , OBSetData
• DeleteDeferredMols() : OBMoleculeFormat
• DeleteHydrogen() : OBMol
• DeleteHydrogens() : OBMol
• DeleteNonPolarHydrogens() : OBMol
• DeleteProperties() : OBDescriptor
• DeleteResidue() : OBAtom , OBMol
• denom : GasteigerState
• DescribeAsString() : transform3d
• DescribeAsValues() : transform3d
• DescribeBits() : OBFingerprint
• Description() : OBFormat , OBGroupContrib , OBConversion , OpTransform , OBPlugin
• DestroyAtom() : OBMol
• DestroyBond() : OBMol
• DestroyResidue() : OBMol
• DetectExplosion() : OBForceField
• determinant() : matrix3x3
• Display() : OBFormat , OBPlugin , OBDescriptor
• DistanceGeometry() : OBForceField
• distSq() : vector3
• Do() : OBOp , OpTransform
• DoElement() : XMLBaseFormat
• DoOps() : OBOp
• DoTransformations() : OBMol , OBBase
• dst : BondSpec
• Duplicate() : OBAtom

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

-d- 1194
Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-e-

• E : OBRateData
• E_Angle() : OBForceField
• E_Bond() : OBForceField
• E_Electrostatic() : OBForceField
• E_OOP() : OBForceField

-e- 1195
Open Babel: API Documentation
• E_StrBnd() : OBForceField
• E_Torsion() : OBForceField
• E_VDW() : OBForceField
• Efficiencies : OBRateData
• Elapsed() : OBStopwatch
• Empty() : OBBitVec , OBTorsion , OBMol , OBSmartsPattern
• EnableAllPairs() : OBForceField
• EnableCutOff() : OBForceField
• End() : OBPlugin
• EndAtoms() : OBMol , OBResidue
• EndBit() : OBBitVec
• EndBonds() : OBAtom , OBMol
• EndData() : OBBase
• EndElement() : XMLBaseFormat
• EndMList() : OBSmartsPattern
• EndModify() : OBMol
• EndNumber : OBConversion
• EndResidues() : OBMol
• EndRings() : OBRingData , OBRingSearch
• EndRotamer() : OBRotamerList
• EndRotors() : OBRotorList
• EndTag() : XMLBaseFormat
• EndTorIncrement() : OBRotor
• Energy() : OBForceField
• energy : OBFFCalculation2
• Eval() : OBScoreGrid
• ExcludeSmallRing() : OBAromaticTyper
• Expand() : AliasData
• expand_kekulize() : OBMol
• ExpandConformerList() : OBRotamerList
• expandcycle() : OBMol
• ExplicitHydrogenCount() : OBAtom
• expr : BondSpec , AtomSpec

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

-e- 1196
Open Babel: API Documentation

• Related Pages
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-e- 1197
Open Babel: API Documentation

-f-

• factor : OBFFConstraint
• FastSearchIndexer() : FastSearchIndexer
• FillAngleArray() : OBAngleData
• FillOrth() : matrix3x3
• FillTorsionArray() : OBTorsionData
• FillUnitCell() : OBUnitCell
• FilterCompare() : OBDescriptor
• FilteringInputStreambuf() : FilteringInputStreambuf
• finalize() : LineEndingExtractor
• Find() : FastSearch , SpaceGroup
• FindAngles() : OBMol
• findCenterAndNormal() : OBRing
• FindChildren() : OBMol
• FindChiralCenters() : OBMol
• findEigenvectorsIfSymmetric() : matrix3x3
• findFiles() : DLHandler
• FindFingerprint() : OBFingerprint
• FindForceField() : OBForceField
• FindFormat() : OBConversion
• FindLargestFragment() : OBMol
• FindMatch() : FastSearch
• FindRingAtomsAndBonds() : OBMol
• FindRotors() : OBRotorList
• FindSimilar() : FastSearch
• FindSSSR() : OBMol
• FindTorsions() : OBMol
• first : triple , quad
• first_type : triple , quad
• FirstBit() : OBBitVec
• FirstLine() : OBPlugin
• Flags() : OBFingerprint , OBFormat
• Fold() : OBBitVec , OBFingerprint
• force_a : OBFFCalculation2
• force_b : OBFFCalculation2
• force_c : OBFFCalculation3
• force_d : OBFFCalculation4
• ForceImplH() : OBAtom
• ForceNoH() : OBAtom
• FormatFilesLoaded : OBConversion
• FormatFromExt() : OBConversion
• FormatFromMIME() : OBConversion , OBFormat
• fourth : quad
• fourth_type : quad
• fpid : FptIndexHeader
• FPT_UNIQUEBITS : OBFingerprint
• fptdata : FptIndex
• FptFlag : OBFingerprint
• FromString() : OBBitVec
• FromVecInt() : OBBitVec

-f- 1198
Open Babel: API Documentation

• FullConvert() : OBConversion

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m

-f- 1199
Open Babel: API Documentation
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-g-

• GasteigerState() : GasteigerState
• GenerateVelocities() : OBForceField
• GENOPTIONS : OBConversion
• Get() : matrix3x3 , vector3
• GetA() : OBUnitCell
• GetADs() : OBTorsion
• GetAgent() : OBReaction
• GetAlias() : AliasData
• GetAllData() : OBBase
• GetAllredRochowElectroNeg() : OBElement , OBElementTable
• GetAlpha() : OBUnitCell
• GetAminoAcidProperty() : OBResidue
• GetAngle() : OBAtom , OBTorsion , OBAngle , OBMol , OBAtom
• GetArray() : matrix3x3
• GetAtom() : OBExternalBond , OBMol
• GetAtom4Refs() : OBChiralData
• GetAtomicMass() : OBAtom
• GetAtomicNum() : OBAtom , OBElement , OBElementTable , OBSmartsPattern
• GetAtomID() : OBResidue
• GetAtomIdx() : OBRTree
• GetAtomProperty() : OBResidue
• GetAtomRef() : OBChiralData
• GetAtoms() : OBAngle , OBResidue
• GetAtomTypes() : OBForceField
• GetAttribute() : OBGenericData , XMLConversion
• GetAuditMessageCount() : OBMessageHandler
• GetAuxConv() : OBConversion
• GetAxes() : OBGridData
• GetB() : OBUnitCell
• GetBaseCoordinateSet() : OBRotamerList
• GetBC() : OBTorsion
• GetBegin() : OBSetData

-g- 1200
Open Babel: API Documentation
• GetBeginAtom() : OBBond
• GetBeginAtomIdx() : OBBond
• GetBeta() : OBUnitCell
• GetBgn() : OBVirtualBond
• GetBit() : OBFingerprint
• Getbitsperint() : OBFingerprint
• GetBlue() : OBElement
• GetBO() : OBBond
• GetBond() : OBAtom , OBExternalBond , OBMol , OBSmartsPattern , OBRotor
• GetBondIdx() : OBTorsion
• GetBondOrder() : OBBond
• GetBonds() : OBResidue
• GetC() : OBUnitCell
• GetCellMatrix() : OBUnitCell
• GetCellVectors() : OBUnitCell
• GetCellVolume() : OBUnitCell
• GetChain() : OBResidue
• GetChainNum() : OBResidue
• GetCharge() : OBSmartsPattern
• GetChemObject() : OBConversion
• GetCIdx() : OBAtom
• GetClass() : OBAtomClassData
• GetClassString() : OBAtomClassData
• GetCoeff() : OBNasaThermoData
• GetColumn() : matrix3x3
• GetComment() : OBReaction
• GetConformer() : OBMol
• GetConformers() : OBForceField , OBMol
• GetConstraintAtomA() : OBFFConstraints
• GetConstraintAtomB() : OBFFConstraints
• GetConstraintAtomC() : OBFFConstraints
• GetConstraintAtomD() : OBFFConstraints
• GetConstraintEnergy() : OBFFConstraints
• GetConstraints() : OBForceField
• GetConstraintType() : OBFFConstraints
• GetConstraintValue() : OBFFConstraints
• GetContent() : XMLConversion
• GetContentDouble() : XMLConversion
• GetContentInt() : XMLConversion
• getConvDirectory() : DLHandler
• GetCoordinate() : OBAtom
• GetCoordinateIdx() : OBAtom
• GetCoordinates() : OBForceField , OBMol
• GetCovalentRad() : OBElement , OBElementTable
• GetData() : OBBase , OBCommentData , OBExternalBondData , OBSetData , OBRingData ,
OBConformerData , OBTorsionData , OBAngleData , OBSerialNums , OBVectorData ,
OBMatrixData
• GetDataType() : OBGenericData
• GetDataVector() : OBFloatGrid
• GetDebugMessageCount() : OBMessageHandler
• GetDefaultFormat() : OBConversion

-g- 1201
Open Babel: API Documentation
• GetDefaultXMLClass() : XMLConversion
• GetDelta() : OBRotorRule , OBRotor
• GetDerived() : XMLConversion
• GetDihedralAtoms() : OBRotor
• GetDim() : OBFloatGrid
• GetDimension() : OBConformerData , OBMol
• GetDisplacements() : OBConformerData
• GetDistance() : OBAtom
• GetEfficiency() : OBRateData
• GetElectronAffinity() : OBElement , OBElementTable
• GetElectroNeg() : OBElement , OBElementTable
• GetElectrostaticCutOff() : OBForceField
• GetEnd() : OBSetData , OBVirtualBond
• GetEndAtom() : OBBond
• GetEndAtomIdx() : OBBond
• GetEnergies() : OBConformerData , OBMol
• GetEnergy() : OBMol
• GetEquibLength() : OBBond
• GetError() : OBError
• GetErrorMessageCount() : OBMessageHandler
• GetEvalAtoms() : OBRotor
• GetExactMass() : OBAtom , OBIsotopeTable , OBMol
• GetExpandedAtoms() : AliasData
• GetExplanation() : OBError
• GetFactor() : OBFFConstraints
• GetFingerprint() : OBFingerprint , FastSearch
• GetFirstAtom() : OBMol
• GetFixedAtoms() : OBRotor
• GetFlag() : OBAtom
• GetFlags() : OBBond , OBMol
• GetForces() : OBConformerData
• GetFormalCharge() : OBAtom
• getFormatFilePattern() : DLHandler
• GetFormula() : OBMol
• GetFractionalMatrix() : OBUnitCell
• GetFragment() : OBBuilder
• GetFrequencies() : OBVibrationData
• GetFromType() : OBTypeTable
• GetGamma() : OBUnitCell
• GetGenericValue() : OBPairTemplate
• GetGIDVector() : OBMol
• GetGIVector() : OBMol
• GetGradient() : OBFFConstraint , OBFFConstraints , OBForceField
• GetGradientPtr() : OBForceField
• GetGreen() : OBElement
• GetGrid() : OBForceField
• GetGTDVector() : OBMol
• GetHalfSpace() : OBFloatGrid
• GetHallName() : SpaceGroup
• GetHeteroValence() : OBAtom
• GetHiT() : OBNasaThermoData

-g- 1202
Open Babel: API Documentation
• GetHMName() : SpaceGroup
• GetHvyValence() : OBAtom
• GetHyb() : OBAtom
• GetId() : SpaceGroup
• GetID() : OBPlugin
• GetIdentifier() : OBDescriptor
• GetIdx() : OBAtom , OBBond , OBExternalBond , OBResidue , OBRotor
• GetIgnoredBitVec() : OBFFConstraints
• GetImplicitValence() : OBAtom
• GetIndexHeader() : FastSearch
• GetInFilename() : OBConversion
• GetInfoMessageCount() : OBMessageHandler
• GetInFormat() : OBConversion
• GetInLen() : OBConversion
• GetInPos() : OBConversion
• GetInStream() : OBConversion
• GetIntensities() : OBVibrationData
• GetInternalCoord() : OBMol
• GetIonization() : OBElement , OBElementTable
• GetIsotope() : OBAtom
• GetKey() : OBRotorKeys
• GetLatticeType() : OBUnitCell
• GetLength() : OBBond
• GetLevel() : OBError
• GetLineSearchType() : OBForceField
• GetLogLevel() : OBForceField
• GetLoRate() : OBRateData
• GetLoT() : OBNasaThermoData
• GetLx() : OBVibrationData
• GetMap() : OBPlugin
• GetMapList() : OBSmartsPattern
• GetMass() : OBElement , OBElementTable
• GetMax() : OBFloatGrid
• GetMaxBonds() : OBElementTable , OBElement
• GetMaxLogEntries() : OBMessageHandler
• GetMaxValue() : OBGridData
• GetMaxVector() : OBGridData
• GetMessagesOfLevel() : OBMessageHandler
• GetMessageSummary() : OBMessageHandler
• GetMethod() : OBError
• GetMidpointVector() : OBFloatGrid
• GetMidT() : OBNasaThermoData
• GetMIMEType() : OBFormat
• GetMin() : OBFloatGrid
• GetMinValue() : OBGridData
• GetMod() : OBMol
• GetMolWt() : OBMol
• GetName() : OBElementTable , OBElement , OBResidue
• GetNbrAtom() : OBBond
• GetNbrAtomIdx() : OBBond
• GetNewBondVector() : OBAtom , OBBuilder

-g- 1203
Open Babel: API Documentation
• GetNextAtom() : OBAtom
• GetNextEff() : OBRateData
• GetNextFormat() : OBConversion
• GetNextFragment() : OBMol
• GetNum() : OBResidue
• GetNumAtoms() : OBResidue
• GetNumberOfElements() : OBElementTable
• GetNumberOfFrequencies() : OBVibrationData
• GetNumberOfPoints() : OBGridData
• GetNumberOfSteps() : OBGridData
• GetNumPairs() : OBForceField
• GetNumString() : OBResidue
• GetNumSymmetries() : OBGridData
• GetOffset() : OBUnitCell
• GetOptionParams() : OBConversion
• GetOptions() : OBConversion
• getorden() : OBMol
• GetOrder() : OBVirtualBond
• GetOrigin() : OBGenericData
• GetOriginVector() : OBGridData
• GetOrthoMatrix() : OBUnitCell
• GetOutFormat() : OBConversion
• GetOutputIndex() : OBConversion , XMLConversion
• GetOutputLevel() : OBMessageHandler
• GetOutputStream() : OBMessageHandler
• GetOutStream() : OBConversion
• GetParameter() : OBForceField
• GetParameterIdx() : OBForceField
• GetParent() : OBAtom , OBRing , OBBond
• GetPartialCharge() : OBAtom
• GetPartialCharges() : OBForceField
• GetPhase() : OBNasaThermoData
• GetPlugin() : OBPlugin
• GetPointGroup() : OBSymmetryData
• GetPossibleCause() : OBError
• GetProduct() : OBReaction
• GetProxVector() : OBProxGrid
• GetRate() : OBRateData
• GetReactant() : OBReaction
• GetReader() : XMLConversion
• GetRed() : OBElement
• GetReferenceArray() : OBRotamerList
• GetReferenceAtoms() : OBRotorRule
• GetResidue() : OBMol , OBAtom
• GetResidueProperty() : OBResidue
• GetResKey() : OBResidue
• GetResolution() : OBRotor
• GetRGB() : OBElementTable
• GetRootAtom() : OBRing
• GetRotAtoms() : OBRotor
• GetRotConsts() : OBRotationData

-g- 1204
Open Babel: API Documentation
• GetRotorIncrements() : OBRotorRules
• GetRotorType() : OBRotationData
• GetRow() : matrix3x3
• GetScale() : OBFloatGrid
• getSeparator() : DLHandler
• GetSerialNum() : OBResidue
• GetSize() : OBTypeTable , OBResidueData , OBGlobalDataBase , OBBitVec , OBBondTyper ,
OBIsotopeTable , OBChiralData , OBTorsionData , OBRotorRules , OBRingTyper , OBPhModel ,
OBAromaticTyper , OBAtomTyper , OBTorsion , OBAngleData , OBElementTable
• GetSMARTS() : OBSmartsPattern
• GetSmartsPattern() : OBRotorRule
• GetSmartsString() : OBRotorRule
• GetSource() : FilteringInputStreambuf
• GetSpacedFormula() : OBMol
• GetSpaceGroup() : SpaceGroup , OBSymmetryData , SpaceGroup , OBUnitCell
• GetSpaceGroupName() : OBUnitCell
• GetSpaceGroupNumber() : OBUnitCell
• GetSpacing() : OBFloatGrid
• GetSpinMultiplicity() : OBAtom
• GetSSSR() : OBMol
• GetStereo() : OBVirtualBond
• GetStringValue() : OBDescriptor
• GetSuggestedRemedy() : OBError
• GetSupportedInputFormat() : OBConversion
• GetSupportedOutputFormat() : OBConversion
• GetSymbol() : OBElementTable , OBElement
• GetSymmetryNumber() : OBRotationData
• GetTitle() : OBConversion , OBMol , OBReaction
• GetTorsion() : OBMol
• GetTorsions() : OBTorsion
• GetTorsionVals() : OBRotorRule
• GetTotalCharge() : OBMol
• GetTotalSpinMultiplicity() : OBMol
• GetToType() : OBTypeTable
• GetTransitionState() : OBReaction
• GetTroeParam() : OBRateData
• GetType() : OBFormat , OBMoleculeFormat , OBRing , OBScoreGrid , XMLMoleculeFormat ,
OBAtom
• GetTypeMap() : OBPlugin
• GetUMapList() : OBSmartsPattern
• GetUnit() : OBForceField , OBGridData
• GetUnrestricted() : OBGridData
• GetUpdateFrequency() : OBForceField
• GetValence() : OBAtom
• GetVals() : OBFloatGrid
• GetValue() : OBGenericData , OBFloatGrid , OBGridData , OBCommentData , OBPairData
• GetValues() : OBDescriptor , OBGridData
• GetVDWCutOff() : OBForceField
• GetVdwRad() : OBElementTable , OBElement
• GetVector() : OBAtom
• GetVectorBinding() : OBSmartsPattern

-g- 1205
Open Babel: API Documentation
• GetVelocities() : OBConformerData
• GetWarningMessageCount() : OBMessageHandler
• GetWords() : OBBitVec
• GetWriter() : XMLConversion
• GetX() : OBAtom
• GetXAxis() : OBFloatGrid , OBGridData
• GetXdim() : OBFloatGrid
• GetXmax() : OBGrid
• GetXmin() : OBGrid
• GetY() : OBAtom
• GetYAxis() : OBGridData , OBFloatGrid
• GetYdim() : OBFloatGrid
• GetYmax() : OBGrid
• GetYmin() : OBGrid
• GetZ() : OBAtom
• GetZAxis() : OBGridData , OBFloatGrid
• GetZdim() : OBFloatGrid
• GetZmax() : OBGrid
• GetZmin() : OBGrid
• grada : OBFFConstraint
• gradb : OBFFConstraint
• gradc : OBFFConstraint
• gradd : OBFFConstraint
• gridtype : OBScoreGrid
• grow : BondSpec
• GSVResize() : OBGastChrg

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

-g- 1206
Open Babel: API Documentation
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-h-

• Has2D() : OBMol
• Has3D() : OBMol
• HasAlphaBetaUnsat() : OBAtom
• HasAnalyticalGradients() : OBForceField
• HasAromaticBond() : OBAtom
• HasAromaticCorrected() : OBMol
• HasAromaticPerceived() : OBMol

-h- 1207
Open Babel: API Documentation
• HasAtomTypesPerceived() : OBMol
• HasBondOfOrder() : OBAtom
• HasChainsPerceived() : OBMol
• HasChiralityPerceived() : OBMol
• HasChiralitySpecified() : OBAtom
• HasChiralVolume() : OBAtom
• HasClass() : OBAtomClassData
• HasClosureBondsPerceived() : OBMol
• HasData() : OBBase
• HasDoubleBond() : OBAtom
• hasExplicitH : Pattern
• HasFixedAtoms() : OBRotorList
• HasFlag() : OBAtom , OBBond , OBMol
• HasGroups() : OBForceField
• HasHybridizationPerceived() : OBMol
• HasHydrogensAdded() : OBMol
• HasImplHForced() : OBAtom
• HasImplicitValencePerceived() : OBMol
• HasKekulePerceived() : OBMol
• HasNoHForced() : OBAtom
• HasNonSingleBond() : OBAtom
• HasNonZeroCoords() : OBMol
• HasPartialChargesPerceived() : OBMol
• HasResidue() : OBAtom
• HasRingAtomsAndBondsPerceived() : OBMol
• HasRingTypesPerceived() : OBMol
• HasSingleBond() : OBAtom
• HasSpinMultiplicityAssigned() : OBMol
• HasSSSRPerceived() : OBMol
• header : FptIndex
• headerlength : FptIndexHeader
• Hexagonal : OBUnitCell
• hi : DoubleType
• HiT : OBNasaThermoData
• HtoMethyl() : OBAtom

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.

-h- 1208
Open Babel: API Documentation

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-h- 1209
Open Babel: API Documentation

-i-

• ia : OBFFConstraint
• ib : OBFFConstraint
• ic : OBFFConstraint
• id : OBFFConstraint
• IdentifyEvalAtoms() : OBRotorList
• IdentifyPointGroup() : OBPointGroup
• idx_a : OBFFCalculation2
• idx_b : OBFFCalculation2
• idx_c : OBFFCalculation3
• idx_d : OBFFCalculation4
• IgnoreCalculation() : OBForceField
• IgnoreSymmetryRemoval() : OBRotorList
• ImplicitHydrogenCount() : OBAtom
• IncrementedFileName() : OBConversion
• IncrementImplicitValence() : OBAtom
• IncrementMod() : OBMol
• ind : XMLBaseFormat
• Index : OBConversion
• IndexToCoords() : OBFloatGrid
• InFilename : OBConversion
• Init() : OBGlobalDataBase , OBGrid , OBFloatGrid , OBScoreGrid , OBSqrtTbl , OBSmartsPattern ,
OBChemTsfm , OBRotorList
• Inject() : OBFloatGrid
• INOPTIONS : OBConversion
• InsertAtom() : OBMol , OBResidue
• InsertBond() : OBAtom
• InstallStreamFilter() : OBConversion
• Interpolate() : OBFloatGrid
• InterpolateDerivatives() : OBFloatGrid
• inverse() : matrix3x3
• IsAcid() : OBChemTsfm
• IsAmide() : OBBond
• IsAmideNitrogen() : OBAtom
• IsAntiClockwise() : OBAtom
• IsApprox() : vector3
• IsAromatic() : OBAtom , OBBond , OBRing
• IsAromaticNOxide() : OBAtom
• IsAxial() : OBAtom
• IsBase() : OBChemTsfm
• IsCarbon() : OBAtom
• IsCarbonyl() : OBBond
• IsCarboxylOxygen() : OBAtom
• IsChiral() : OBAtom , OBMol
• ischiral : Pattern
• IsClockwise() : OBAtom
• IsClosure() : OBBond
• IsConnected() : OBAtom
• IsCorrectedForPH() : OBMol
• IsCutOffEnabled() : OBForceField

-i- 1210
Open Babel: API Documentation
• isDiagonal() : matrix3x3
• IsDouble() : OBBond
• IsDoubleBondGeometry() : OBBond
• IsDown() : OBBond
• IsEmpty() : OBBitVec
• IsEster() : OBBond
• IsExpanded() : AliasData
• IsFirstInput() : OBConversion
• IsFixed() : OBFFConstraints
• IsFixedBond() : OBRotorList
• IsHash() : OBBond
• IsHbondAcceptor() : OBAtom
• IsHbondDonor() : OBAtom
• IsHbondDonorH() : OBAtom
• IsHetAtom() : OBResidue
• IsHeteroatom() : OBAtom
• IsHydrogen() : OBAtom
• IsIgnored() : OBFFConstraints
• IsInRing() : OBAtom , OBBond , OBRing
• IsInRingSize() : OBAtom
• IsInSameRing() : OBForceField
• IsKDouble() : OBBond
• IsKSingle() : OBBond
• IsKTriple() : OBBond
• IsLast() : OBConversion , XMLConversion
• IsLastFile() : OBConversion
• IsMember() : OBRing
• IsNegativeStereo() : OBAtom
• IsNitrogen() : OBAtom
• IsNitroOxygen() : OBAtom
• IsNonPolarHydrogen() : OBAtom
• IsNotCorH() : OBAtom
• IsOneFour() : OBAtom
• IsOneThree() : OBAtom
• IsOption() : OBConversion
• isOrthogonal() : matrix3x3
• IsOxygen() : OBAtom
• IsPhosphateOxygen() : OBAtom
• IsPhosphorus() : OBAtom
• IsPolarHydrogen() : OBAtom
• IsPositiveStereo() : OBAtom
• IsPrimaryAmide() : OBBond
• IsProtonRotor() : OBTorsion
• ispunctU() : OBDescriptor
• IsResidueType() : OBResidue
• IsReversible() : OBReaction
• IsRotor() : OBBond
• IsSecondaryAmide() : OBBond
• IsSetupNeeded() : OBForceField
• IsSingle() : OBBond
• IsSulfateOxygen() : OBAtom

-i- 1211
Open Babel: API Documentation
• IsSulfur() : OBAtom
• isSymmetric() : matrix3x3
• IsTriple() : OBBond
• Istype() : patty
• isUnitMatrix() : matrix3x3
• IsUp() : OBBond
• IsValid() : OBSmartsPattern , SpaceGroup , OBRotorRule
• IsWedge() : OBBond
• IsXFixed() : OBFFConstraints
• IsYFixed() : OBFFConstraints
• IsZFixed() : OBFFConstraints

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c

-i- 1212
Open Babel: API Documentation
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-p-

• parity : OBChiralData
• ParseLine() : OBBondTyper , OBElementTable , OBPhModel , OBRotorRules , OBIsotopeTable ,
OBAtomTyper , OBAromaticTyper , OBGlobalDataBase , OBTypeTable , OBRingTyper ,
OBResidueData
• ParseParamFile() : OBForceField
• ParsePredicate() : OBDescriptor
• part : AtomSpec
• parts : Pattern
• PathSize() : OBRing
• PathToRoot() : OBRTree
• patty() : patty
• pAuxConv : OBConversion
• pDefaultFormat : OBConversion
• PerceiveBondOrders() : OBMol
• PerceiveChains() : OBChainsParser
• PerceiveKekuleBonds() : OBMol
• phase : OBNasaThermoData
• pInFormat : OBConversion
• pInStream : OBConversion
• PlaneReflection() : matrix3x3
• pLineEndBuf : OBConversion
• PluginIterator : OBPlugin

-p- 1213
Open Babel: API Documentation
• PluginMap() : OBPlugin
• PluginMapType : OBPlugin
• pOb1 : OBConversion
• PointIsInBox() : OBGrid
• PolarGrid() : OBProxGrid
• pos_a : OBFFCalculation2
• pos_b : OBFFCalculation2
• pos_c : OBFFCalculation3
• pos_d : OBFFCalculation4
• pOutFormat : OBConversion
• pOutStream : OBConversion
• Precalc() : OBRotor
• Precompute() : OBRotor
• Predict() : OBGroupContrib , OBDescriptor
• PredictAndSave() : OBDescriptor
• PrintFormalCharges() : OBForceField
• PrintPartialCharges() : OBForceField
• PrintTypes() : OBForceField
• PrintVector() : OBForceField
• PrintVelocities() : OBForceField
• prop : _BondExpr , _AtomExpr
• PropagatePotentialAromatic() : OBAromaticTyper
• PushBack() : OBRingData

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

-p- 1214
Open Babel: API Documentation
• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-q-

• q : GasteigerState
• quad() : quad
• Quiet() : OBRotorRules

-q- 1215
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o

-q- 1216
Open Babel: API Documentation
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-r-

• rab0 : OBFFConstraint
• randomRotation() : matrix3x3
• RandomRotorSearch() : OBForceField
• RandomRotorSearchInitialize() : OBForceField
• RandomRotorSearchNextConformer() : OBForceField
• randomUnitVector() : vector3
• rate_type : OBRateData
• Rates : OBRateData
• rbc0 : OBFFConstraint
• reaction_type : OBRateData
• ReactionType : OBRateData
• Read() : FptIndex , OBScoreGrid , OBConversion
• read_rules() : patty
• ReadChemObject() : OBFormat , OBMoleculeFormat , XMLMoleculeFormat
• ReadChemObjectImpl() : OBMoleculeFormat
• reader() : XMLBaseFormat
• ReadFile() : OBConversion
• ReadIndex() : FastSearch
• ReadIndexFile() : FastSearch
• ReadMolecule() : OBFormat , XMLMoleculeFormat
• ReadNameIndex() : OBMoleculeFormat
• ReadStream() : XMLConversion
• ReadString() : OBConversion
• ReadStringFromFilter() : OBDescriptor
• ReadXML() : XMLConversion
• ReadyToInput : OBConversion
• recur : _AtomExpr
• RegisterFormat() : OBFormat , OBConversion
• RegisterOptionParam() : OBConversion
• RegisterSpaceGroup() : SpaceGroup
• RegisterXMLFormat() : XMLConversion
• RemoveAtom() : OBResidue
• RemoveOption() : OBConversion
• RemoveRedundant() : OBRingSearch

-r- 1217
Open Babel: API Documentation
• RemoveSymTorsionValues() : OBRotor
• RemoveSymVals() : OBRotorList
• RenumberAtoms() : OBMol
• ReportNumberConverted() : OBConversion
• ReserveAtoms() : OBMol
• Resize() : OBBitVec
• ResizeWords() : OBBitVec
• RestoreLocale() : OBLocale
• RestrictedMatch() : OBSmartsPattern
• rgt : _BondExpr , _AtomExpr
• Rhombohedral : OBUnitCell
• rInlen : OBConversion
• rInpos : OBConversion
• RotAboutAxisByAngle() : matrix3x3
• Rotate() : OBMol
• RotConsts : OBRotationData
• RType : OBRotationData

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

-r- 1218
Open Babel: API Documentation
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-s-

• SaveUniqueRing() : OBRingSearch
• score : OBScoreGrid
• second : quad , triple
• second_type : triple , quad
• Seed() : OBRandom
• seekdata : FptIndex
• seekoff() : FilteringInputStreambuf
• seekpos() : FilteringInputStreambuf
• SelectRootAtoms() : OBAromaticTyper
• Separate() : OBMol
• Set() : OBRotor , matrix3x3 , vector3 , OBBond , OBRotor
• SetAlias() : AliasData
• SetAngle() : OBTorsion , OBAngle
• SetAntiClockwiseStereo() : OBAtom
• SetAromatic() : OBAtom , OBBond
• SetAromaticCorrected() : OBMol

-s- 1219
Open Babel: API Documentation
• SetAromaticPerceived() : OBMol
• SetAtom() : OBExternalBond
• SetAtom4Refs() : OBChiralData
• SetAtomicNum() : OBAtom
• SetAtomID() : OBResidue
• SetAtoms() : OBAngle
• SetAtomTypesPerceived() : OBMol
• SetAttribute() : OBGenericData
• SetAutomaticFormalCharge() : OBMol
• SetAutomaticPartialCharge() : OBMol
• SetAuxConv() : OBConversion
• SetBaseCoordinateSets() : OBRotamerList
• SetBegin() : OBBond
• SetBit() : OBFingerprint
• SetBitOff() : OBBitVec
• SetBitOn() : OBBitVec
• SetBO() : OBBond
• SetBond() : OBExternalBond , OBRotor
• SetBondOrder() : OBBond
• SetChain() : OBResidue
• SetChainNum() : OBResidue
• SetChainsPerceived() : OBMol
• SetChiral() : OBAtom
• SetChiralityPerceived() : OBMol
• SetClockwiseStereo() : OBAtom
• SetClosure() : OBBond
• SetClosureBondsPerceived() : OBMol
• SetCoeff() : OBNasaThermoData
• SetColumn() : matrix3x3
• SetComment() : OBReaction
• SetConformer() : OBMol
• SetConformers() : OBForceField , OBMol
• SetConstraints() : OBForceField
• SetCoordinates() : OBForceField , OBMol
• SetCoordPtr() : OBAtom
• SetCorrectedForPH() : OBMol
• SetCurrentCoordinates() : OBRotamerList
• SetData() : OBBase , OBCommentData , OBExternalBondData , OBSetData , OBRingData ,
OBUnitCell , OBConformerData , OBSymmetryData , OBTorsion , OBTorsionData , OBAngleData ,
OBSerialNums , OBVibrationData , OBRotationData , OBVectorData , OBMatrixData
• SetDelta() : OBRotorRule , OBRotor
• SetDihedralAtoms() : OBRotor
• SetDimension() : OBConformerData , OBMol
• SetDisplacements() : OBConformerData
• SetDown() : OBBond
• SetEfficiency() : OBRateData
• SetElectrostaticCutOff() : OBForceField
• SetEnd() : OBBond
• SetEnergies() : OBConformerData , OBMol
• SetEnergy() : OBMol
• SetEnvironmentVariable() : OBGlobalDataBase

-s- 1220
Open Babel: API Documentation
• SetEvalAtoms() : OBRotor , OBRotorList
• SetExpandedAtoms() : AliasData
• SetFactor() : OBFFConstraints
• SetFilename() : OBRotorRules
• SetFirstInput() : OBConversion
• SetFixAtom() : OBForceField
• SetFixAtoms() : OBRotorList
• SetFixedAtoms() : OBRotor
• SetFlag() : OBAtom , OBBond , OBMol
• SetFlags() : OBMol
• SetForces() : OBConformerData
• SetFormalCharge() : OBAtom
• SetFormalCharges() : OBForceField
• SetFormula() : OBMol
• SetFromType() : OBTypeTable
• SetGradient() : OBForceField
• SetGridType() : OBProxGrid
• SetHallName() : SpaceGroup
• SetHash() : OBBond
• SetHetAtom() : OBResidue
• SetHiT() : OBNasaThermoData
• SetHMName() : SpaceGroup
• SetHyb() : OBAtom
• SetHybAndGeom() : OBAtom
• SetHybridizationPerceived() : OBMol
• SetHydrogensAdded() : OBMol
• SetId() : SpaceGroup
• SetIdx() : OBAtom , OBBond , OBExternalBond , OBResidue , OBRotor
• SetIgnoreAtom() : OBForceField
• SetImplicitValence() : OBAtom
• SetImplicitValencePerceived() : OBMol
• SetInAndOutFormats() : OBConversion
• SetInFormat() : OBConversion
• SetInRing() : OBAtom , OBBond
• SetInStream() : OBConversion
• SetInternalCoord() : OBMol
• SetIsotope() : OBAtom
• SetKDouble() : OBBond
• SetKekulePerceived() : OBMol
• SetKSingle() : OBBond
• SetKTriple() : OBBond
• SetLast() : OBConversion
• SetLatticeType() : OBUnitCell
• SetLength() : OBBond
• SetLimits() : OBFloatGrid , OBGridData
• SetLineSearchType() : OBForceField
• SetLocale() : OBLocale
• SetLogFile() : OBForceField
• SetLogLevel() : OBForceField
• SetLoRate() : OBRateData
• SetLoT() : OBNasaThermoData

-s- 1221
Open Babel: API Documentation
• SetMaxLogEntries() : OBMessageHandler
• SetMidT() : OBNasaThermoData
• SetMoreFilesToCome() : OBConversion
• SetName() : OBResidue
• SetNegativeStereo() : OBAtom
• SetNum() : OBResidue
• SetNumberOfPoints() : OBFloatGrid , OBGridData
• SetNumCoords() : OBRotor
• SetNumSymmetries() : OBGridData
• SetOffset() : OBUnitCell
• SetOneObjectOnly() : OBConversion
• SetOptions() : OBConversion
• SetOrigin() : OBGenericData
• SetOutFormat() : OBConversion
• SetOutputIndex() : OBConversion
• SetOutputLevel() : OBMessageHandler
• SetOutputStream() : OBMessageHandler
• SetOutStream() : OBConversion
• SetParameterFile() : OBForceField
• SetParent() : OBAtom , OBBond , OBRing
• SetPartialCharge() : OBAtom
• SetPartialCharges() : OBForceField
• SetPartialChargesPerceived() : OBMol
• SetPhase() : OBNasaThermoData
• SetPointGroup() : OBSymmetryData
• SetPositiveStereo() : OBAtom
• SetQuiet() : OBRotorList
• SetRangeOff() : OBBitVec
• SetRangeOn() : OBBitVec
• SetRate() : OBRateData
• SetReadDirectory() : OBGlobalDataBase
• SetResidue() : OBAtom
• SetResName() : OBResidueData
• SetReversible() : OBReaction
• SetRingAtomsAndBondsPerceived() : OBMol
• SetRingTypesPerceived() : OBMol
• SetRotAtoms() : OBRotor , OBRotorList
• SetRotAtomsByFix() : OBRotorList
• SetRotor() : OBRotor
• SetRow() : matrix3x3
• SetSerialNum() : OBResidue
• SetSource() : FilteringInputStreambuf
• SetSpaceGroup() : OBUnitCell , OBSymmetryData , OBUnitCell
• SetSpinMultiplicity() : OBAtom
• SetSpinMultiplicityAssigned() : OBMol
• SetSSSRPerceived() : OBMol
• SetStartAndEnd() : OBConversion
• SetTitle() : OBReaction , OBMol
• SetToAngle() : OBRotor
• SetTorsion() : OBMol
• SetTorsionValues() : OBRotor

-s- 1222
Open Babel: API Documentation
• SetTotalCharge() : OBMol
• SetTotalSpinMultiplicity() : OBMol
• SetToType() : OBTypeTable
• SetTransitionState() : OBReaction
• SetTroeParams() : OBRateData
• SetType() : OBAtom , OBRing , OBScoreGrid , OBRing
• SetTypes() : OBForceField
• SetUnit() : OBGridData
• SetUnrestricted() : OBGridData
• Setup() : OBRotamerList , OBRotorList
• SetUp() : OBBond
• Setup() : OBScoreGrid , OBPointGroup , OBForceField , OBRotamerList , OBScoreGrid ,
OBProxGrid , OBFFConstraints , OBProxGrid , OBForceField , OBScoreGrid
• SetupCalculations() : OBForceField
• SetUpdateFrequency() : OBForceField
• SetupPointers() : OBForceField , OBFFCalculation3 , OBFFCalculation4 , OBFFCalculation2
• SetupReader() : XMLConversion
• SetupRotMat() : matrix3x3
• SetupWriter() : XMLConversion
• SetVals() : OBFloatGrid
• SetValue() : OBPairTemplate , OBPairData , OBGridData , OBFloatGrid
• SetValues() : OBGridData , GasteigerState
• SetVDWCutOff() : OBForceField
• SetVector() : OBAtom
• SetVelocities() : OBConformerData
• SetVerbose() : OBScoreGrid
• SetWedge() : OBBond
• SetX() : vector3
• SetXAxis() : OBFloatGrid
• SetY() : vector3
• SetYAxis() : OBFloatGrid
• SetZ() : vector3
• SetZAxis() : OBFloatGrid
• Simple : LineSearchType
• size() : OBAtomClassData
• Size() : OBRotor , OBRotorList , OBFFConstraints , OBRing
• SkipObjects() : OBFormat , XMLBaseFormat
• SkipXML() : XMLConversion
• Sleep() : DLHandler
• SmallestBondAngle() : OBAtom
• SortByIndex() : OBAngle
• SortRings() : OBRingSearch
• SpaceGroup() : SpaceGroup
• SpecificationURL() : OBFormat
• Sqrt() : OBSqrtTbl
• src : BondSpec
• SRI : OBRateData
• Start() : OBStopwatch
• start_kekulize() : OBMol
• StartErrorWrap() : OBMessageHandler
• StartLogging() : OBMessageHandler

-s- 1223
Open Babel: API Documentation
• StartNumber : OBConversion
• SteepestDescent() : OBForceField
• SteepestDescentInitialize() : OBForceField
• SteepestDescentTakeNSteps() : OBForceField
• StopErrorWrap() : OBMessageHandler
• StopLogging() : OBMessageHandler
• StripSalts() : OBMol
• SupportedInputFormat : OBConversion
• SupportedOutputFormat : OBConversion
• Swap() : OBBuilder
• SYMMETRIC : OBRotationData
• SymNum : OBRotationData
• sync() : obLogBuf , FilteringInputStreambuf
• SystematicRotorSearch() : OBForceField
• SystematicRotorSearchInitialize() : OBForceField
• SystematicRotorSearchNextConformer() : OBForceField

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

-s- 1224
Open Babel: API Documentation
•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-t-

• Tanimoto() : OBFingerprint
• TargetClassDescription() : OBFormat
• Tetragonal : OBUnitCell
• third : triple , quad
• third_type : quad , triple
• THREEBODY : OBRateData
• ThrowError() : OBMessageHandler
• TimeSeed() : OBRandom
• ToInertialFrame() : OBMol
• ToVecInt() : OBBitVec
• Transform() : SpaceGroup
• transform3d() : transform3d
• Translate() : OBTypeTable , OBMol
• transpose() : matrix3x3
• TraverseCycle() : OBAromaticTyper
• Triclinic : OBUnitCell
• triple() : triple
• TROE : OBRateData

-t- 1225
Open Babel: API Documentation

• TroeParams : OBRateData
• type : OBFFConstraint , OBRotationData , _AtomExpr , _BondExpr
• type_to_int() : patty
• TypeID() : OBForceField , OBDescriptor , OBOp , OBFormat

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j

-t- 1226
Open Babel: API Documentation
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-u-

• Undefined : OBUnitCell
• underflow() : FilteringInputStreambuf
• Unit : OBGridData
• UNKNOWN : OBRotationData
• UnsetAromatic() : OBAtom , OBBond
• UnsetAromaticPerceived() : OBMol
• UnsetDown() : OBBond
• UnsetFixAtom() : OBForceField
• UnsetFlag() : OBBond , OBMol
• UnsetHash() : OBBond
• UnsetHydrogensAdded() : OBMol
• UnsetIgnoreAtom() : OBForceField
• UnsetImplicitValencePerceived() : OBMol
• UnsetKekule() : OBBond
• UnsetPartialChargesPerceived() : OBMol
• UnsetRingTypesPerceived() : OBMol
• UnsetSSSRPerceived() : OBMol
• UnsetStereo() : OBAtom
• UnsetUp() : OBBond
• UnsetWedge() : OBBond
• UpdateConformers() : OBForceField
• UpdateCoordinates() : OBForceField
• UpdatePairsSimple() : OBForceField

-u- 1227
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o

-u- 1228
Open Babel: API Documentation
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-v-

• Validate() : OBForceField
• ValidateConjugateGradients() : OBForceField
• ValidateGradientError() : OBForceField
• ValidateGradients() : OBForceField
• ValidateLineSearch() : OBForceField
• ValidateSteepestDescent() : OBForceField
• value : _BondExpr , _AtomExpr
• vb : AtomSpec
• vector3() : vector3
• VectorAdd() : OBForceField
• VectorAngle() : OBForceField
• VectorAngleDerivative() : OBForceField
• VectorBondDerivative() : OBForceField
• VectorClear() : OBForceField
• VectorCopy() : OBForceField
• VectorCross() : OBForceField
• VectorDistance() : OBForceField
• VectorDistanceDerivative() : OBForceField
• VectorDivide() : OBForceField
• VectorDot() : OBForceField
• VectorLength() : OBForceField
• VectorLengthDerivative() : OBForceField
• VectorMultiply() : OBForceField
• VectorNormalize() : OBForceField
• VectorOOP() : OBForceField
• VectorOOPDerivative() : OBForceField
• VectorSelfMultiply() : OBForceField
• VectorSubtract() : OBForceField
• VectorTorsion() : OBForceField
• VectorTorsionDerivative() : OBForceField
• verbose : OBScoreGrid
• Visit : OBBond
• visit : AtomSpec , BondSpec
• Visit : OBAtom

-v- 1229
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n

-v- 1230
Open Babel: API Documentation
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-w-

• WeightedRotorSearch() : OBForceField
• wInlen : OBConversion
• wInpos : OBConversion
• word_vector : OBBitVec
• words : FptIndexHeader
• WorksWith() : OBOp , OpTransform
• Write() : OBScoreGrid , OBConversion
• WriteChemObject() : OBFormat , OBMoleculeFormat , XMLMoleculeFormat
• WriteChemObjectImpl() : OBMoleculeFormat
• WriteFile() : OBConversion
• WriteMapList() : OBSmartsPattern
• WriteMolecule() : OBFormat
• writer() : XMLBaseFormat
• WriteRings() : OBRingSearch
• WriteStream() : XMLConversion
• WriteString() : OBConversion

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.

-w- 1231
Open Babel: API Documentation

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-w- 1232
Open Babel: API Documentation

-x-

• x() : OBAtom , vector3


• XMLConversion() : XMLConversion

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i

-x- 1233
Open Babel: API Documentation
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

Here is a list of all class members with links to the classes they belong to:

-y-

• y() : OBAtom , vector3

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

-y- 1234
Open Babel: API Documentation
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

• FptFlag : OBFingerprint
• LatticeType : OBUnitCell
• Option_type : OBConversion
• rate_type : OBRateData
• reaction_type : OBRateData
• RType : OBRotationData
• Unit : OBGridData

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

• All
• Functions
• Variables
• Typedefs

-y- 1235
Open Babel: API Documentation
• Enumerations
• Enumerator
• Related Functions

• A : OBRateData
• ALL : OBConversion
• ANGSTROM : OBGridData
• ARRHENIUS : OBRateData
• ASYMMETRIC : OBRotationData
• BOHR : OBGridData
• Cubic : OBUnitCell
• E : OBRateData
• FPT_UNIQUEBITS : OBFingerprint
• GENOPTIONS : OBConversion
• Hexagonal : OBUnitCell
• INOPTIONS : OBConversion
• LINDERMANN : OBRateData
• LINEAR : OBRotationData
• Monoclinic : OBUnitCell
• n : OBRateData
• Newton2Num : LineSearchType
• Orthorhombic : OBUnitCell
• OTHER : OBGridData
• OUTOPTIONS : OBConversion
• Rhombohedral : OBUnitCell
• Simple : LineSearchType
• SRI : OBRateData
• SYMMETRIC : OBRotationData
• Tetragonal : OBUnitCell
• THREEBODY : OBRateData
• Triclinic : OBUnitCell
• TROE : OBRateData
• Undefined : OBUnitCell
• UNKNOWN : OBRotationData

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:

-y- 1236
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-y- 1237
Open Babel: API Documentation

-a-

• Add() : OBAtomClassData , FastSearchIndexer


• AddAgent() : OBReaction
• AddAngleConstraint() : OBFFConstraints
• AddAtom() : OBMol , OBResidue
• AddAtomConstraint() : OBFFConstraints
• AddAtomRef() : OBChiralData
• AddAtomXConstraint() : OBFFConstraints
• AddAtomYConstraint() : OBFFConstraints
• AddAtomZConstraint() : OBFFConstraints
• AddBond() : OBAtom , OBMol
• AddChemObject() : OBConversion
• AddConformer() : OBMol
• AddData() : OBSetData
• AddDistanceConstraint() : OBFFConstraints
• AddGradient() : OBForceField
• AddHydrogens() : OBMol
• AddIgnore() : OBFFConstraints
• AddInterGroup() : OBForceField
• AddInterGroups() : OBForceField
• AddIntraGroup() : OBForceField
• AddNbrs() : OBBuilder
• AddOption() : OBConversion
• AddPolarHydrogens() : OBMol
• AddProduct() : OBReaction
• AddProperties() : OBDescriptor
• AddReactant() : OBReaction
• AddResidue() : OBAtom , OBMol
• AddRingFromClosure() : OBRingSearch
• AddRotamer() : OBRotamerList
• AddRotamers() : OBRotamerList
• AddRotor() : OBRotorKeys
• AddTorsion() : OBTorsion
• AddTorsionConstraint() : OBFFConstraints
• AddTransform() : SpaceGroup
• AliasData() : AliasData
• Align() : OBMol
• Apply() : OBChemTsfm
• AsArray() : vector3
• assign_rules() : patty
• assign_types() : patty
• AssignAromaticFlags() : OBAromaticTyper
• AssignBonds() : OBResidueData
• AssignFunctionalGroupBonds() : OBBondTyper
• AssignHyb() : OBAtomTyper
• AssignImplicitValence() : OBAtomTyper
• AssignPartialCharges() : OBGastChrg
• AssignSeedPartialCharge() : OBPhModel

-a- 1238
Open Babel: API Documentation

• AssignSpinMultiplicity() : OBMol
• AssignTorVals() : OBRotorList
• AssignTypes() : OBRingTyper , OBAtomTyper
• AutomaticFormalCharge() : OBMol
• AutomaticPartialCharge() : OBMol
• AverageBondAngle() : OBAtom

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i

-a- 1239
Open Babel: API Documentation
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-j-

• jacobi() : matrix3x3

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

-j- 1240
Open Babel: API Documentation
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-k-

• KBOSum() : OBAtom
• Kekulize() : OBMol

-k- 1241
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p

-k- 1242
Open Babel: API Documentation
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-l-

• Lap() : OBStopwatch
• length() : vector3
• length_2() : vector3
• LineSearch() : OBForceField
• LineSearchTakeStep() : OBForceField
• LipoGrid() : OBProxGrid
• List() : OBPlugin
• ListAsString() : OBPlugin
• ListAsVector() : OBPlugin
• LoadFormatFiles() : OBConversion
• LoadFragments() : OBBuilder
• LookForNamespace() : XMLConversion
• LookupBO() : OBResidueData
• LookupType() : OBResidueData

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

-l- 1243
Open Babel: API Documentation

• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-m-

• MakeCombinedMolecule() : OBMoleculeFormat
• MakeInstance() : OBGroupContrib , OBPlugin , OpTransform
• MakeNewInstance() : OBForceField , OBFormat

-m- 1244
Open Babel: API Documentation
• Match() : OBSSMatch , OBSmartsPattern
• MatchesSMARTS() : OBAtom
• MatchPairData() : OBDescriptor
• matrix3x3() : matrix3x3
• MemberOfRingCount() : OBAtom
• MemberOfRingSize() : OBAtom
• message() : OBError
• MolecularDynamicsTakeNSteps() : OBForceField

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g

-m- 1245
Open Babel: API Documentation
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-n-

• Namespaces() : XMLConversion
• NamespaceURI() : XMLBaseFormat
• Negate() : OBBitVec
• NewAtom() : OBMol
• NewBond() : OBMol
• NewPerceiveKekuleBonds() : OBMol
• NewResidue() : OBMol , OBAtom
• Newton2NumLineSearch() : OBForceField
• next() : OBMolAtomDFSIter
• Next() : OBRotorKeys
• NextAtom() : OBMol , OBResidue
• NextBit() : OBBitVec
• NextBond() : OBMol , OBAtom
• NextConformer() : OBMol
• NextFloat() : OBRandom
• NextInt() : OBRandom
• NextInternalCoord() : OBMol
• NextNbrAtom() : OBAtom
• NextResidue() : OBMol
• NextRing() : OBRingData
• NextRotor() : OBRotorList
• NextTransform() : SpaceGroup
• Normalize() : transform3d
• normalize() : vector3
• NumAtoms() : OBMol , OBSmartsPattern , OBRotamerList
• NumBaseCoordinateSets() : OBRotamerList

-n- 1246
Open Babel: API Documentation
• NumBonds() : OBMol , OBSmartsPattern
• NumConformers() : OBMol
• NumericalDerivative() : OBForceField
• NumericalSecondDerivative() : OBForceField
• NumHvyAtoms() : OBMol
• NumKeys() : OBRotorKeys
• NumMatches() : OBSmartsPattern
• NumProducts() : OBReaction
• NumReactants() : OBReaction
• NumResidues() : OBMol
• NumRotamers() : OBRotamerList
• NumRotors() : OBRotamerList , OBMol

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c

-n- 1247
Open Babel: API Documentation
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-o-

• OBAngle() : OBAngle
• OBAngleData() : OBAngleData
• OBAromaticTyper() : OBAromaticTyper
• OBAtom() : OBAtom
• OBAtomAtomIter() : OBAtomAtomIter
• OBAtomBondIter() : OBAtomBondIter
• OBAtomClassData() : OBAtomClassData
• OBAtomTyper() : OBAtomTyper
• OBBitVec() : OBBitVec
• OBBond() : OBBond
• OBBondTyper() : OBBondTyper
• OBChainsParser() : OBChainsParser
• OBChemTsfm() : OBChemTsfm
• OBChiralData() : OBChiralData
• OBCommentData() : OBCommentData
• OBConformerData() : OBConformerData
• OBConversion() : OBConversion
• OBElement() : OBElement
• OBElementTable() : OBElementTable
• OBError() : OBError
• OBExternalBond() : OBExternalBond
• OBExternalBondData() : OBExternalBondData

-o- 1248
Open Babel: API Documentation
• OBFFConstraint() : OBFFConstraint
• OBFFConstraints() : OBFFConstraints
• OBFFLog() : OBForceField
• OBFloatGrid() : OBFloatGrid
• OBFormat() : OBFormat
• OBGastChrg() : OBGastChrg
• OBGenericData() : OBGenericData
• OBGlobalDataBase() : OBGlobalDataBase
• OBGrid() : OBGrid
• OBGridData() : OBGridData
• OBGroupContrib() : OBGroupContrib
• OBInternalCoord() : OBInternalCoord
• OBIsotopeTable() : OBIsotopeTable
• OBLocale() : OBLocale
• OBMatrixData() : OBMatrixData
• OBMessageHandler() : OBMessageHandler
• OBMol() : OBMol
• OBMolAngleIter() : OBMolAngleIter
• OBMolAtomBFSIter() : OBMolAtomBFSIter
• OBMolAtomDFSIter() : OBMolAtomDFSIter
• OBMolAtomIter() : OBMolAtomIter
• OBMolBondIter() : OBMolBondIter
• OBMoleculeFormat() : OBMoleculeFormat
• OBMolPairIter() : OBMolPairIter
• OBMolRingIter() : OBMolRingIter
• OBMolTorsionIter() : OBMolTorsionIter
• OBNasaThermoData() : OBNasaThermoData
• OBPairData() : OBPairData
• OBPairTemplate() : OBPairTemplate
• OBPhModel() : OBPhModel
• OBPointGroup() : OBPointGroup
• OBProxGrid() : OBProxGrid
• OBRandom() : OBRandom
• OBRateData() : OBRateData
• OBReaction() : OBReaction
• OBResidue() : OBResidue
• OBResidueAtomIter() : OBResidueAtomIter
• OBResidueData() : OBResidueData
• OBResidueIter() : OBResidueIter
• OBRing() : OBRing
• OBRingData() : OBRingData
• OBRingSearch() : OBRingSearch
• OBRingTyper() : OBRingTyper
• OBRotamerList() : OBRotamerList
• OBRotationData() : OBRotationData
• OBRotor() : OBRotor
• OBRotorKeys() : OBRotorKeys
• OBRotorList() : OBRotorList
• OBRotorRule() : OBRotorRule
• OBRotorRules() : OBRotorRules
• OBRTree() : OBRTree

-o- 1249
Open Babel: API Documentation
• OBScoreGrid() : OBScoreGrid
• OBSerialNums() : OBSerialNums
• OBSetData() : OBSetData
• OBSmartsPattern() : OBSmartsPattern
• OBSqrtTbl() : OBSqrtTbl
• OBSSMatch() : OBSSMatch
• OBSymmetryData() : OBSymmetryData
• OBTorsion() : OBTorsion
• OBTorsionData() : OBTorsionData
• OBTypeTable() : OBTypeTable
• OBUnitCell() : OBUnitCell
• OBVectorData() : OBVectorData
• OBVibrationData() : OBVibrationData
• OBVirtualBond() : OBVirtualBond
• OpenAndSetFormat() : OBConversion
• OpenInAndOutFiles() : OBConversion
• openLib() : DLHandler
• operator &=() : OBBitVec
• operator bool() : OBMolAtomIter , OBMolAtomDFSIter , OBMolAtomBFSIter , OBAtomAtomIter ,
OBAtomBondIter , OBResidueIter , OBResidueAtomIter , OBMolAngleIter , OBMolTorsionIter ,
OBMolPairIter , OBMolRingIter , OBMolBondIter
• operator!=() : SpaceGroup , vector3
• operator()() : LineEndingExtractor , matrix3x3 , CharPtrLess
• operator*() : OBMolAtomIter , OBMolAtomBFSIter , OBMolBondIter , OBAtomAtomIter ,
OBAtomBondIter , OBResidueIter , OBResidueAtomIter , OBMolAngleIter , transform3d ,
OBMolPairIter , OBMolRingIter , transform3d , OBMolTorsionIter , OBMolAtomDFSIter
• operator*=() : vector3 , matrix3x3 , vector3
• operator++() : OBAtomBondIter , OBMolRingIter , OBMolAngleIter , OBResidueIter ,
OBAtomAtomIter , OBMolAtomBFSIter , OBMolAtomIter , OBMolBondIter , OBMolAtomIter ,
OBMolAtomDFSIter , OBMolAtomBFSIter , OBAtomAtomIter , OBAtomBondIter , OBResidueIter
, OBMolTorsionIter , OBMolPairIter , OBMolRingIter , OBResidueAtomIter
• operator+=() : vector3 , OBMol , OBBitVec
• operator-=() : OBBitVec , vector3
• operator->() : OBResidueIter , OBMolAtomDFSIter , OBMolAtomIter , OBMolBondIter ,
OBAtomBondIter , OBAtomAtomIter , OBMolRingIter , OBMolAtomBFSIter , OBResidueAtomIter
• operator/=() : vector3 , matrix3x3
• operator=() : vector3 , OBAngle , OBCommentData , OBMolAtomBFSIter , OBBitVec , OBMol ,
OBMolRingIter , OBFFParameter , OBTorsionData , OBAtomBondIter , OBResidueIter ,
OBMolAtomIter , OBAngleData , OBMolAngleIter , OBSymmetryData , OBMolBondIter ,
OBChiralData , OBResidue , OBMolTorsionIter , OBFFConstraints , OBTorsion , OBRingData ,
OBSmartsPattern , OBConformerData , OBMolPairIter , OBAtom , OBAtomAtomIter ,
OBMolAtomDFSIter , OBUnitCell , OBVibrationData , OBRing , OBResidueAtomIter
• operator==() : vector3 , SpaceGroup , OBAngle , OBError
• operator[]() : vector3 , OBBitVec
• operator^=() : OBBitVec
• operator|=() : OBBitVec
• OpOptions() : OBOp
• OptionParamArray() : OBConversion
• OpTransform() : OpTransform
• OutputDeferredMols() : OBMoleculeFormat
• OutputToStream() : XMLConversion , XMLBaseFormat

-o- 1250
Open Babel: API Documentation

• overflow() : FilteringInputStreambuf

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n

-o- 1251
Open Babel: API Documentation
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-z-

• z() : OBAtom , vector3

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

• All
• Functions
• Variables

-z- 1252
Open Babel: API Documentation
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-~-

• ~FastSearch() : FastSearch
• ~FastSearchIndexer() : FastSearchIndexer
• ~FilteringInputStreambuf() : FilteringInputStreambuf
• ~GasteigerState() : GasteigerState
• ~matrix3x3() : matrix3x3
• ~OBAngle() : OBAngle
• ~OBAromaticTyper() : OBAromaticTyper
• ~OBAtom() : OBAtom
• ~OBAtomAtomIter() : OBAtomAtomIter
• ~OBAtomBondIter() : OBAtomBondIter
• ~OBAtomTyper() : OBAtomTyper
• ~OBBase() : OBBase
• ~OBBond() : OBBond
• ~OBBondTyper() : OBBondTyper

-~- 1253
Open Babel: API Documentation
• ~OBChainsParser() : OBChainsParser
• ~OBChemTsfm() : OBChemTsfm
• ~OBChiralData() : OBChiralData
• ~OBConformerData() : OBConformerData
• ~OBConversion() : OBConversion
• ~OBElementTable() : OBElementTable
• ~OBExternalBond() : OBExternalBond
• ~OBFFCalculation2() : OBFFCalculation2
• ~OBFFCalculation3() : OBFFCalculation3
• ~OBFFCalculation4() : OBFFCalculation4
• ~OBFFConstraint() : OBFFConstraint
• ~OBFFConstraints() : OBFFConstraints
• ~OBFingerprint() : OBFingerprint
• ~OBFloatGrid() : OBFloatGrid
• ~OBForceField() : OBForceField
• ~OBGastChrg() : OBGastChrg
• ~OBGenericData() : OBGenericData
• ~OBGlobalDataBase() : OBGlobalDataBase
• ~OBGridData() : OBGridData
• ~OBIsotopeTable() : OBIsotopeTable
• ~OBLocale() : OBLocale
• ~obLogBuf() : obLogBuf
• ~OBMatrixData() : OBMatrixData
• ~OBMessageHandler() : OBMessageHandler
• ~OBMol() : OBMol
• ~OBMolAngleIter() : OBMolAngleIter
• ~OBMolAtomBFSIter() : OBMolAtomBFSIter
• ~OBMolAtomDFSIter() : OBMolAtomDFSIter
• ~OBMolAtomIter() : OBMolAtomIter
• ~OBMolBondIter() : OBMolBondIter
• ~OBMolPairIter() : OBMolPairIter
• ~OBMolRingIter() : OBMolRingIter
• ~OBMolTorsionIter() : OBMolTorsionIter
• ~OBPhModel() : OBPhModel
• ~OBPlugin() : OBPlugin
• ~OBPointGroup() : OBPointGroup
• ~OBProxGrid() : OBProxGrid
• ~OBResidue() : OBResidue
• ~OBResidueAtomIter() : OBResidueAtomIter
• ~OBResidueIter() : OBResidueIter
• ~OBRingData() : OBRingData
• ~OBRingSearch() : OBRingSearch
• ~OBRingTyper() : OBRingTyper
• ~OBRotamerList() : OBRotamerList
• ~OBRotationData() : OBRotationData
• ~OBRotor() : OBRotor
• ~OBRotorList() : OBRotorList
• ~OBRotorRule() : OBRotorRule
• ~OBRotorRules() : OBRotorRules
• ~OBRTree() : OBRTree
• ~OBScoreGrid() : OBScoreGrid

-~- 1254
Open Babel: API Documentation
• ~OBSmartsPattern() : OBSmartsPattern
• ~OBSqrtTbl() : OBSqrtTbl
• ~OBSSMatch() : OBSSMatch
• ~OBSymmetryData() : OBSymmetryData
• ~OBTorsion() : OBTorsion
• ~OBTypeTable() : OBTypeTable
• ~OBUnitCell() : OBUnitCell
• ~OBVectorData() : OBVectorData
• ~OBVibrationData() : OBVibrationData
• ~OpTransform() : OpTransform
• ~patty() : patty
• ~SpaceGroup() : SpaceGroup
• ~vector3() : vector3
• ~XMLBaseFormat() : XMLBaseFormat
• ~XMLConversion() : XMLConversion
• ~XMLMoleculeFormat() : XMLMoleculeFormat

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

-~- 1255
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-b-

• BaseFindType() : OBPlugin
• BatchFileName() : OBConversion
• Begin() : OBPlugin
• BeginAtom() : OBMol , OBResidue
• BeginAtoms() : OBMol , OBResidue
• BeginBond() : OBAtom , OBMol
• BeginBonds() : OBAtom , OBMol
• BeginConformer() : OBMol
• BeginData() : OBBase
• BeginInternalCoord() : OBMol
• BeginMList() : OBSmartsPattern
• BeginModify() : OBMol
• BeginNbrAtom() : OBAtom
• BeginResidue() : OBMol
• BeginResidues() : OBMol
• BeginRing() : OBRingData
• BeginRings() : OBRingData , OBRingSearch
• BeginRotamer() : OBRotamerList
• BeginRotor() : OBRotorList

-b- 1256
Open Babel: API Documentation

• BeginRotors() : OBRotorList
• BeginTorIncrement() : OBRotor
• BeginTransform() : SpaceGroup
• BitIsOn() : OBBitVec
• BitIsSet() : OBBitVec
• BOSum() : OBAtom
• Build() : OBBuilder

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h

-b- 1257
Open Babel: API Documentation
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-c-

• CalcBondLength() : OBRotor
• CalcTorsion() : OBRotor
• CanBeNormalized() : vector3
• CastAndClear() : OBBase
• Center() : OBMol , OBFloatGrid , OBScoreGrid , OBMol
• CenterMol() : OBScoreGrid
• CheckAromaticity() : OBAromaticTyper
• CheckForUnintendedBatch() : OBConversion
• CheckFP() : FptIndex
• ClassDescription() : OBBase , OBMol , OBReaction
• Clear() : OBAtom , OBAtomClassData , OBBase , OBBitVec , OBFFConstraints , OBTorsion ,
OBTorsionData , OBAngle , OBAngleData , OBChiralData , OBScoreGrid , OBMol , OBResidue ,
OBRotorList , OBRotorKeys
• clear() : OBFFParameter
• ClearBond() : OBAtom
• ClearCoordPtr() : OBAtom
• ClearGradients() : OBForceField
• ClearGroups() : OBForceField
• ClearLog() : OBMessageHandler
• Clone() : AliasData , OBAtomClassData , OBRotamerList , OBGenericData , OBCommentData ,
OBExternalBondData , OBVectorData , OBPairData , OBSetData , OBVirtualBond , OBRingData ,
OBUnitCell , OBConformerData , OBSymmetryData , OBTorsionData , OBAngleData ,
OBChiralData , OBSerialNums , OBVibrationData , OBRotationData , OBMatrixData , OBRateData
, OBNasaThermoData
• CloneData() : OBBase
• CloseOutFile() : OBConversion
• Compare() : OBDescriptor

-c- 1258
Open Babel: API Documentation
• CompareStringWithFilter() : OBDescriptor
• Config() : OBScoreGrid
• ConjugateGradients() : OBForceField
• ConjugateGradientsInitialize() : OBForceField
• ConjugateGradientsTakeNSteps() : OBForceField
• Connect() : OBBuilder
• ConnectTheDots() : OBMol
• ContigFragList() : OBMol
• Convert() : OBConversion
• ConvertDativeBonds() : OBMol
• CoordsToIndex() : OBFloatGrid
• CopyConformer() : OBMol
• CopyOptions() : OBConversion
• CorrectAromaticNitrogens() : OBAtomTyper
• CorrectedBondRad() : OBElementTable
• CorrectedVdwRad() : OBElementTable
• CorrectForPH() : OBPhModel , OBMol
• CorrectStereoAtoms() : OBBuilder
• CorrectStereoBonds() : OBBuilder
• CorrectVelocities() : OBForceField
• CountBits() : OBBitVec
• CountBondsOfOrder() : OBAtom
• CountFreeOxygens() : OBAtom
• CountRingBonds() : OBAtom
• CreateAtom() : OBMol
• CreateBond() : OBMol
• CreateConformerList() : OBRotamerList
• createOrthoVector() : vector3
• CreateResidue() : OBMol
• CurrentDepth() : OBMolAtomBFSIter

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

-c- 1259
Open Babel: API Documentation
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-d-

• DataSize() : OBBase
• debug_off() : patty
• debug_on() : patty
• DecrementImplicitValence() : OBAtom

-d- 1260
Open Babel: API Documentation
• DecrementMod() : OBMol
• DeferMolOutput() : OBMoleculeFormat
• DeleteAtom() : OBMol
• DeleteBond() : OBAtom , OBMol
• DeleteConformer() : OBMol
• DeleteConstraint() : OBFFConstraints
• DeleteData() : OBSetData , OBBase
• DeleteDeferredMols() : OBMoleculeFormat
• DeleteHydrogen() : OBMol
• DeleteHydrogens() : OBMol
• DeleteNonPolarHydrogens() : OBMol
• DeleteProperties() : OBDescriptor
• DeleteResidue() : OBAtom , OBMol
• DescribeAsString() : transform3d
• DescribeAsValues() : transform3d
• DescribeBits() : OBFingerprint
• Description() : OBPlugin , OpTransform , OBFormat , OBGroupContrib , OBConversion
• DestroyAtom() : OBMol
• DestroyBond() : OBMol
• DestroyResidue() : OBMol
• DetectExplosion() : OBForceField
• determinant() : matrix3x3
• Display() : OBPlugin , OBFormat , OBDescriptor
• DistanceGeometry() : OBForceField
• distSq() : vector3
• Do() : OBOp , OpTransform
• DoElement() : XMLBaseFormat
• DoOps() : OBOp
• DoTransformations() : OBMol , OBBase
• Duplicate() : OBAtom

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

-d- 1261
Open Babel: API Documentation
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-e-

• E_Angle() : OBForceField
• E_Bond() : OBForceField
• E_Electrostatic() : OBForceField
• E_OOP() : OBForceField

-e- 1262
Open Babel: API Documentation
• E_StrBnd() : OBForceField
• E_Torsion() : OBForceField
• E_VDW() : OBForceField
• Elapsed() : OBStopwatch
• Empty() : OBBitVec , OBTorsion , OBMol , OBSmartsPattern
• EnableAllPairs() : OBForceField
• EnableCutOff() : OBForceField
• End() : OBPlugin
• EndAtoms() : OBMol , OBResidue
• EndBit() : OBBitVec
• EndBonds() : OBAtom , OBMol
• EndData() : OBBase
• EndElement() : XMLBaseFormat
• EndMList() : OBSmartsPattern
• EndModify() : OBMol
• EndResidues() : OBMol
• EndRings() : OBRingSearch , OBRingData
• EndRotamer() : OBRotamerList
• EndRotors() : OBRotorList
• EndTag() : XMLBaseFormat
• EndTorIncrement() : OBRotor
• Energy() : OBForceField
• Eval() : OBScoreGrid
• ExcludeSmallRing() : OBAromaticTyper
• Expand() : AliasData
• expand_kekulize() : OBMol
• ExpandConformerList() : OBRotamerList
• expandcycle() : OBMol
• ExplicitHydrogenCount() : OBAtom

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

-e- 1263
Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-f-

• FastSearchIndexer() : FastSearchIndexer
• FillAngleArray() : OBAngleData
• FillOrth() : matrix3x3
• FillTorsionArray() : OBTorsionData
• FillUnitCell() : OBUnitCell
• FilterCompare() : OBDescriptor

-f- 1264
Open Babel: API Documentation
• FilteringInputStreambuf() : FilteringInputStreambuf
• finalize() : LineEndingExtractor
• Find() : FastSearch , SpaceGroup
• FindAngles() : OBMol
• findCenterAndNormal() : OBRing
• FindChildren() : OBMol
• FindChiralCenters() : OBMol
• findEigenvectorsIfSymmetric() : matrix3x3
• findFiles() : DLHandler
• FindFingerprint() : OBFingerprint
• FindForceField() : OBForceField
• FindFormat() : OBConversion
• FindLargestFragment() : OBMol
• FindMatch() : FastSearch
• FindRingAtomsAndBonds() : OBMol
• FindRotors() : OBRotorList
• FindSimilar() : FastSearch
• FindSSSR() : OBMol
• FindTorsions() : OBMol
• FirstBit() : OBBitVec
• FirstLine() : OBPlugin
• Flags() : OBFingerprint , OBFormat
• Fold() : OBFingerprint , OBBitVec
• ForceImplH() : OBAtom
• ForceNoH() : OBAtom
• FormatFromExt() : OBConversion
• FormatFromMIME() : OBConversion , OBFormat
• FromString() : OBBitVec
• FromVecInt() : OBBitVec
• FullConvert() : OBConversion

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

-f- 1265
Open Babel: API Documentation
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-g-

• GasteigerState() : GasteigerState
• GenerateVelocities() : OBForceField
• Get() : vector3 , matrix3x3
• GetA() : OBUnitCell

-g- 1266
Open Babel: API Documentation
• GetADs() : OBTorsion
• GetAgent() : OBReaction
• GetAlias() : AliasData
• GetAllData() : OBBase
• GetAllredRochowElectroNeg() : OBElement , OBElementTable
• GetAlpha() : OBUnitCell
• GetAminoAcidProperty() : OBResidue
• GetAngle() : OBTorsion , OBAngle , OBMol , OBAtom
• GetArray() : matrix3x3
• GetAtom() : OBExternalBond , OBMol
• GetAtom4Refs() : OBChiralData
• GetAtomicMass() : OBAtom
• GetAtomicNum() : OBAtom , OBElement , OBElementTable , OBSmartsPattern
• GetAtomID() : OBResidue
• GetAtomIdx() : OBRTree
• GetAtomProperty() : OBResidue
• GetAtomRef() : OBChiralData
• GetAtoms() : OBAngle , OBResidue
• GetAtomTypes() : OBForceField
• GetAttribute() : OBGenericData , XMLConversion
• GetAuditMessageCount() : OBMessageHandler
• GetAuxConv() : OBConversion
• GetAxes() : OBGridData
• GetB() : OBUnitCell
• GetBaseCoordinateSet() : OBRotamerList
• GetBC() : OBTorsion
• GetBegin() : OBSetData
• GetBeginAtom() : OBBond
• GetBeginAtomIdx() : OBBond
• GetBeta() : OBUnitCell
• GetBgn() : OBVirtualBond
• GetBit() : OBFingerprint
• Getbitsperint() : OBFingerprint
• GetBlue() : OBElement
• GetBO() : OBBond
• GetBond() : OBAtom , OBExternalBond , OBMol , OBSmartsPattern , OBRotor
• GetBondIdx() : OBTorsion
• GetBondOrder() : OBBond
• GetBonds() : OBResidue
• GetC() : OBUnitCell
• GetCellMatrix() : OBUnitCell
• GetCellVectors() : OBUnitCell
• GetCellVolume() : OBUnitCell
• GetChain() : OBResidue
• GetChainNum() : OBResidue
• GetCharge() : OBSmartsPattern
• GetChemObject() : OBConversion
• GetCIdx() : OBAtom
• GetClass() : OBAtomClassData
• GetClassString() : OBAtomClassData
• GetCoeff() : OBNasaThermoData

-g- 1267
Open Babel: API Documentation
• GetColumn() : matrix3x3
• GetComment() : OBReaction
• GetConformer() : OBMol
• GetConformers() : OBForceField , OBMol
• GetConstraintAtomA() : OBFFConstraints
• GetConstraintAtomB() : OBFFConstraints
• GetConstraintAtomC() : OBFFConstraints
• GetConstraintAtomD() : OBFFConstraints
• GetConstraintEnergy() : OBFFConstraints
• GetConstraints() : OBForceField
• GetConstraintType() : OBFFConstraints
• GetConstraintValue() : OBFFConstraints
• GetContent() : XMLConversion
• GetContentDouble() : XMLConversion
• GetContentInt() : XMLConversion
• getConvDirectory() : DLHandler
• GetCoordinate() : OBAtom
• GetCoordinateIdx() : OBAtom
• GetCoordinates() : OBForceField , OBMol
• GetCovalentRad() : OBElement , OBElementTable
• GetData() : OBBase , OBCommentData , OBExternalBondData , OBSetData , OBRingData ,
OBConformerData , OBTorsionData , OBAngleData , OBSerialNums , OBVectorData ,
OBMatrixData
• GetDataType() : OBGenericData
• GetDataVector() : OBFloatGrid
• GetDebugMessageCount() : OBMessageHandler
• GetDefaultFormat() : OBConversion
• GetDefaultXMLClass() : XMLConversion
• GetDelta() : OBRotorRule , OBRotor
• GetDerived() : XMLConversion
• GetDihedralAtoms() : OBRotor
• GetDim() : OBFloatGrid
• GetDimension() : OBConformerData , OBMol
• GetDisplacements() : OBConformerData
• GetDistance() : OBAtom
• GetEfficiency() : OBRateData
• GetElectronAffinity() : OBElement , OBElementTable
• GetElectroNeg() : OBElement , OBElementTable
• GetElectrostaticCutOff() : OBForceField
• GetEnd() : OBSetData , OBVirtualBond
• GetEndAtom() : OBBond
• GetEndAtomIdx() : OBBond
• GetEnergies() : OBConformerData , OBMol
• GetEnergy() : OBMol
• GetEquibLength() : OBBond
• GetError() : OBError
• GetErrorMessageCount() : OBMessageHandler
• GetEvalAtoms() : OBRotor
• GetExactMass() : OBAtom , OBIsotopeTable , OBMol
• GetExpandedAtoms() : AliasData
• GetExplanation() : OBError

-g- 1268
Open Babel: API Documentation
• GetFactor() : OBFFConstraints
• GetFingerprint() : OBFingerprint , FastSearch
• GetFirstAtom() : OBMol
• GetFixedAtoms() : OBRotor
• GetFlag() : OBAtom
• GetFlags() : OBBond , OBMol
• GetForces() : OBConformerData
• GetFormalCharge() : OBAtom
• getFormatFilePattern() : DLHandler
• GetFormula() : OBMol
• GetFractionalMatrix() : OBUnitCell
• GetFragment() : OBBuilder
• GetFrequencies() : OBVibrationData
• GetFromType() : OBTypeTable
• GetGamma() : OBUnitCell
• GetGenericValue() : OBPairTemplate
• GetGIDVector() : OBMol
• GetGIVector() : OBMol
• GetGradient() : OBFFConstraint , OBFFConstraints , OBForceField
• GetGradientPtr() : OBForceField
• GetGreen() : OBElement
• GetGrid() : OBForceField
• GetGTDVector() : OBMol
• GetHalfSpace() : OBFloatGrid
• GetHallName() : SpaceGroup
• GetHeteroValence() : OBAtom
• GetHiT() : OBNasaThermoData
• GetHMName() : SpaceGroup
• GetHvyValence() : OBAtom
• GetHyb() : OBAtom
• GetId() : SpaceGroup
• GetID() : OBPlugin
• GetIdentifier() : OBDescriptor
• GetIdx() : OBAtom , OBBond , OBExternalBond , OBResidue , OBRotor
• GetIgnoredBitVec() : OBFFConstraints
• GetImplicitValence() : OBAtom
• GetIndexHeader() : FastSearch
• GetInFilename() : OBConversion
• GetInfoMessageCount() : OBMessageHandler
• GetInFormat() : OBConversion
• GetInLen() : OBConversion
• GetInPos() : OBConversion
• GetInStream() : OBConversion
• GetIntensities() : OBVibrationData
• GetInternalCoord() : OBMol
• GetIonization() : OBElement , OBElementTable
• GetIsotope() : OBAtom
• GetKey() : OBRotorKeys
• GetLatticeType() : OBUnitCell
• GetLength() : OBBond
• GetLevel() : OBError

-g- 1269
Open Babel: API Documentation
• GetLineSearchType() : OBForceField
• GetLogLevel() : OBForceField
• GetLoRate() : OBRateData
• GetLoT() : OBNasaThermoData
• GetLx() : OBVibrationData
• GetMap() : OBPlugin
• GetMapList() : OBSmartsPattern
• GetMass() : OBElement , OBElementTable
• GetMax() : OBFloatGrid
• GetMaxBonds() : OBElement , OBElementTable
• GetMaxLogEntries() : OBMessageHandler
• GetMaxValue() : OBGridData
• GetMaxVector() : OBGridData
• GetMessagesOfLevel() : OBMessageHandler
• GetMessageSummary() : OBMessageHandler
• GetMethod() : OBError
• GetMidpointVector() : OBFloatGrid
• GetMidT() : OBNasaThermoData
• GetMIMEType() : OBFormat
• GetMin() : OBFloatGrid
• GetMinValue() : OBGridData
• GetMod() : OBMol
• GetMolWt() : OBMol
• GetName() : OBResidue , OBElement , OBElementTable
• GetNbrAtom() : OBBond
• GetNbrAtomIdx() : OBBond
• GetNewBondVector() : OBBuilder , OBAtom , OBBuilder
• GetNextAtom() : OBAtom
• GetNextEff() : OBRateData
• GetNextFormat() : OBConversion
• GetNextFragment() : OBMol
• GetNum() : OBResidue
• GetNumAtoms() : OBResidue
• GetNumberOfElements() : OBElementTable
• GetNumberOfFrequencies() : OBVibrationData
• GetNumberOfPoints() : OBGridData
• GetNumberOfSteps() : OBGridData
• GetNumPairs() : OBForceField
• GetNumString() : OBResidue
• GetNumSymmetries() : OBGridData
• GetOffset() : OBUnitCell
• GetOptionParams() : OBConversion
• GetOptions() : OBConversion
• getorden() : OBMol
• GetOrder() : OBVirtualBond
• GetOrigin() : OBGenericData
• GetOriginVector() : OBGridData
• GetOrthoMatrix() : OBUnitCell
• GetOutFormat() : OBConversion
• GetOutputIndex() : OBConversion , XMLConversion
• GetOutputLevel() : OBMessageHandler

-g- 1270
Open Babel: API Documentation
• GetOutputStream() : OBMessageHandler
• GetOutStream() : OBConversion
• GetParameter() : OBForceField
• GetParameterIdx() : OBForceField
• GetParent() : OBRing , OBAtom , OBBond
• GetPartialCharge() : OBAtom
• GetPartialCharges() : OBForceField
• GetPhase() : OBNasaThermoData
• GetPlugin() : OBPlugin
• GetPointGroup() : OBSymmetryData
• GetPossibleCause() : OBError
• GetProduct() : OBReaction
• GetProxVector() : OBProxGrid
• GetRate() : OBRateData
• GetReactant() : OBReaction
• GetReader() : XMLConversion
• GetRed() : OBElement
• GetReferenceArray() : OBRotamerList
• GetReferenceAtoms() : OBRotorRule
• GetResidue() : OBAtom , OBMol , OBAtom
• GetResidueProperty() : OBResidue
• GetResKey() : OBResidue
• GetResolution() : OBRotor
• GetRGB() : OBElementTable
• GetRootAtom() : OBRing
• GetRotAtoms() : OBRotor
• GetRotConsts() : OBRotationData
• GetRotorIncrements() : OBRotorRules
• GetRotorType() : OBRotationData
• GetRow() : matrix3x3
• GetScale() : OBFloatGrid
• getSeparator() : DLHandler
• GetSerialNum() : OBResidue
• GetSize() : OBChiralData , OBTorsion , OBBondTyper , OBGlobalDataBase , OBElementTable ,
OBTypeTable , OBAngleData , OBPhModel , OBAtomTyper , OBRotorRules , OBResidueData ,
OBAromaticTyper , OBIsotopeTable , OBTorsionData , OBBitVec , OBRingTyper
• GetSMARTS() : OBSmartsPattern
• GetSmartsPattern() : OBRotorRule
• GetSmartsString() : OBRotorRule
• GetSource() : FilteringInputStreambuf
• GetSpacedFormula() : OBMol
• GetSpaceGroup() : SpaceGroup , OBUnitCell , OBSymmetryData , SpaceGroup
• GetSpaceGroupName() : OBUnitCell
• GetSpaceGroupNumber() : OBUnitCell
• GetSpacing() : OBFloatGrid
• GetSpinMultiplicity() : OBAtom
• GetSSSR() : OBMol
• GetStereo() : OBVirtualBond
• GetStringValue() : OBDescriptor
• GetSuggestedRemedy() : OBError
• GetSupportedInputFormat() : OBConversion

-g- 1271
Open Babel: API Documentation
• GetSupportedOutputFormat() : OBConversion
• GetSymbol() : OBElementTable , OBElement
• GetSymmetryNumber() : OBRotationData
• GetTitle() : OBReaction , OBMol , OBConversion
• GetTorsion() : OBMol
• GetTorsions() : OBTorsion
• GetTorsionVals() : OBRotorRule
• GetTotalCharge() : OBMol
• GetTotalSpinMultiplicity() : OBMol
• GetToType() : OBTypeTable
• GetTransitionState() : OBReaction
• GetTroeParam() : OBRateData
• GetType() : OBScoreGrid , XMLMoleculeFormat , OBMoleculeFormat , OBFormat , OBRing ,
OBAtom
• GetTypeMap() : OBPlugin
• GetUMapList() : OBSmartsPattern
• GetUnit() : OBGridData , OBForceField
• GetUnrestricted() : OBGridData
• GetUpdateFrequency() : OBForceField
• GetValence() : OBAtom
• GetVals() : OBFloatGrid
• GetValue() : OBGenericData , OBCommentData , OBPairData , OBGridData , OBFloatGrid ,
OBGridData
• GetValues() : OBGridData , OBDescriptor
• GetVDWCutOff() : OBForceField
• GetVdwRad() : OBElementTable , OBElement
• GetVector() : OBAtom
• GetVectorBinding() : OBSmartsPattern
• GetVelocities() : OBConformerData
• GetWarningMessageCount() : OBMessageHandler
• GetWords() : OBBitVec
• GetWriter() : XMLConversion
• GetX() : OBAtom
• GetXAxis() : OBGridData , OBFloatGrid
• GetXdim() : OBFloatGrid
• GetXmax() : OBGrid
• GetXmin() : OBGrid
• GetY() : OBAtom
• GetYAxis() : OBGridData , OBFloatGrid
• GetYdim() : OBFloatGrid
• GetYmax() : OBGrid
• GetYmin() : OBGrid
• GetZ() : OBAtom
• GetZAxis() : OBGridData , OBFloatGrid
• GetZdim() : OBFloatGrid
• GetZmax() : OBGrid
• GetZmin() : OBGrid
• GSVResize() : OBGastChrg

-g- 1272
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p

-g- 1273
Open Babel: API Documentation
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-h-

• Has2D() : OBMol
• Has3D() : OBMol
• HasAlphaBetaUnsat() : OBAtom
• HasAnalyticalGradients() : OBForceField
• HasAromaticBond() : OBAtom
• HasAromaticCorrected() : OBMol
• HasAromaticPerceived() : OBMol
• HasAtomTypesPerceived() : OBMol
• HasBondOfOrder() : OBAtom
• HasChainsPerceived() : OBMol
• HasChiralityPerceived() : OBMol
• HasChiralitySpecified() : OBAtom
• HasChiralVolume() : OBAtom
• HasClass() : OBAtomClassData
• HasClosureBondsPerceived() : OBMol
• HasData() : OBBase
• HasDoubleBond() : OBAtom
• HasFixedAtoms() : OBRotorList
• HasFlag() : OBMol , OBAtom , OBBond
• HasGroups() : OBForceField
• HasHybridizationPerceived() : OBMol
• HasHydrogensAdded() : OBMol
• HasImplHForced() : OBAtom
• HasImplicitValencePerceived() : OBMol
• HasKekulePerceived() : OBMol
• HasNoHForced() : OBAtom
• HasNonSingleBond() : OBAtom
• HasNonZeroCoords() : OBMol
• HasPartialChargesPerceived() : OBMol
• HasResidue() : OBAtom
• HasRingAtomsAndBondsPerceived() : OBMol
• HasRingTypesPerceived() : OBMol
• HasSingleBond() : OBAtom
• HasSpinMultiplicityAssigned() : OBMol
• HasSSSRPerceived() : OBMol

-h- 1274
Open Babel: API Documentation

• HtoMethyl() : OBAtom

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n

-h- 1275
Open Babel: API Documentation
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-i-

• IdentifyEvalAtoms() : OBRotorList
• IdentifyPointGroup() : OBPointGroup
• IgnoreCalculation() : OBForceField
• IgnoreSymmetryRemoval() : OBRotorList
• ImplicitHydrogenCount() : OBAtom
• IncrementedFileName() : OBConversion
• IncrementImplicitValence() : OBAtom
• IncrementMod() : OBMol
• IndexToCoords() : OBFloatGrid
• Init() : OBSqrtTbl , OBSmartsPattern , OBChemTsfm , OBRotorList , OBGlobalDataBase , OBGrid ,
OBFloatGrid , OBScoreGrid
• Inject() : OBFloatGrid
• InsertAtom() : OBMol , OBResidue
• InsertBond() : OBAtom
• InstallStreamFilter() : OBConversion
• Interpolate() : OBFloatGrid
• InterpolateDerivatives() : OBFloatGrid
• inverse() : matrix3x3
• IsAcid() : OBChemTsfm
• IsAmide() : OBBond
• IsAmideNitrogen() : OBAtom
• IsAntiClockwise() : OBAtom
• IsApprox() : vector3
• IsAromatic() : OBAtom , OBBond , OBRing
• IsAromaticNOxide() : OBAtom
• IsAxial() : OBAtom
• IsBase() : OBChemTsfm
• IsCarbon() : OBAtom
• IsCarbonyl() : OBBond
• IsCarboxylOxygen() : OBAtom
• IsChiral() : OBAtom , OBMol
• IsClockwise() : OBAtom
• IsClosure() : OBBond

-i- 1276
Open Babel: API Documentation
• IsConnected() : OBAtom
• IsCorrectedForPH() : OBMol
• IsCutOffEnabled() : OBForceField
• isDiagonal() : matrix3x3
• IsDouble() : OBBond
• IsDoubleBondGeometry() : OBBond
• IsDown() : OBBond
• IsEmpty() : OBBitVec
• IsEster() : OBBond
• IsExpanded() : AliasData
• IsFirstInput() : OBConversion
• IsFixed() : OBFFConstraints
• IsFixedBond() : OBRotorList
• IsHash() : OBBond
• IsHbondAcceptor() : OBAtom
• IsHbondDonor() : OBAtom
• IsHbondDonorH() : OBAtom
• IsHetAtom() : OBResidue
• IsHeteroatom() : OBAtom
• IsHydrogen() : OBAtom
• IsIgnored() : OBFFConstraints
• IsInRing() : OBAtom , OBBond , OBRing
• IsInRingSize() : OBAtom
• IsInSameRing() : OBForceField
• IsKDouble() : OBBond
• IsKSingle() : OBBond
• IsKTriple() : OBBond
• IsLast() : OBConversion , XMLConversion
• IsLastFile() : OBConversion
• IsMember() : OBRing
• IsNegativeStereo() : OBAtom
• IsNitrogen() : OBAtom
• IsNitroOxygen() : OBAtom
• IsNonPolarHydrogen() : OBAtom
• IsNotCorH() : OBAtom
• IsOneFour() : OBAtom
• IsOneThree() : OBAtom
• IsOption() : OBConversion
• isOrthogonal() : matrix3x3
• IsOxygen() : OBAtom
• IsPhosphateOxygen() : OBAtom
• IsPhosphorus() : OBAtom
• IsPolarHydrogen() : OBAtom
• IsPositiveStereo() : OBAtom
• IsPrimaryAmide() : OBBond
• IsProtonRotor() : OBTorsion
• ispunctU() : OBDescriptor
• IsResidueType() : OBResidue
• IsReversible() : OBReaction
• IsRotor() : OBBond
• IsSecondaryAmide() : OBBond

-i- 1277
Open Babel: API Documentation
• IsSetupNeeded() : OBForceField
• IsSingle() : OBBond
• IsSulfateOxygen() : OBAtom
• IsSulfur() : OBAtom
• isSymmetric() : matrix3x3
• IsTriple() : OBBond
• Istype() : patty
• isUnitMatrix() : matrix3x3
• IsUp() : OBBond
• IsValid() : OBRotorRule , OBSmartsPattern , SpaceGroup
• IsWedge() : OBBond
• IsXFixed() : OBFFConstraints
• IsYFixed() : OBFFConstraints
• IsZFixed() : OBFFConstraints

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a

-i- 1278
Open Babel: API Documentation
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-p-

• ParseLine() : OBBondTyper , OBGlobalDataBase , OBIsotopeTable , OBRotorRules , OBAtomTyper


, OBTypeTable , OBAromaticTyper , OBRingTyper , OBElementTable , OBResidueData ,
OBPhModel
• ParseParamFile() : OBForceField
• ParsePredicate() : OBDescriptor
• PathSize() : OBRing
• PathToRoot() : OBRTree
• patty() : patty
• PerceiveBondOrders() : OBMol
• PerceiveChains() : OBChainsParser
• PerceiveKekuleBonds() : OBMol
• PlaneReflection() : matrix3x3
• PluginMap() : OBPlugin
• PointIsInBox() : OBGrid
• PolarGrid() : OBProxGrid
• Precalc() : OBRotor
• Precompute() : OBRotor
• Predict() : OBDescriptor , OBGroupContrib
• PredictAndSave() : OBDescriptor
• PrintFormalCharges() : OBForceField

-p- 1279
Open Babel: API Documentation

• PrintPartialCharges() : OBForceField
• PrintTypes() : OBForceField
• PrintVector() : OBForceField
• PrintVelocities() : OBForceField
• PropagatePotentialAromatic() : OBAromaticTyper
• PushBack() : OBRingData

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i

-p- 1280
Open Babel: API Documentation
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-q-

• quad() : quad
• Quiet() : OBRotorRules

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

-q- 1281
Open Babel: API Documentation
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-r-

• randomRotation() : matrix3x3
• RandomRotorSearch() : OBForceField
• RandomRotorSearchInitialize() : OBForceField
• RandomRotorSearchNextConformer() : OBForceField
• randomUnitVector() : vector3
• Read() : OBConversion , FptIndex , OBScoreGrid
• read_rules() : patty
• ReadChemObject() : OBFormat , OBMoleculeFormat , XMLMoleculeFormat

-r- 1282
Open Babel: API Documentation
• ReadChemObjectImpl() : OBMoleculeFormat
• reader() : XMLBaseFormat
• ReadFile() : OBConversion
• ReadIndex() : FastSearch
• ReadIndexFile() : FastSearch
• ReadMolecule() : OBFormat , XMLMoleculeFormat
• ReadNameIndex() : OBMoleculeFormat
• ReadStream() : XMLConversion
• ReadString() : OBConversion
• ReadStringFromFilter() : OBDescriptor
• ReadXML() : XMLConversion
• RegisterFormat() : OBFormat , OBConversion
• RegisterOptionParam() : OBConversion
• RegisterSpaceGroup() : SpaceGroup
• RegisterXMLFormat() : XMLConversion
• RemoveAtom() : OBResidue
• RemoveOption() : OBConversion
• RemoveRedundant() : OBRingSearch
• RemoveSymTorsionValues() : OBRotor
• RemoveSymVals() : OBRotorList
• RenumberAtoms() : OBMol
• ReportNumberConverted() : OBConversion
• ReserveAtoms() : OBMol
• Resize() : OBBitVec
• ResizeWords() : OBBitVec
• RestoreLocale() : OBLocale
• RestrictedMatch() : OBSmartsPattern
• RotAboutAxisByAngle() : matrix3x3
• Rotate() : OBMol

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

-r- 1283
Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-s-

• SaveUniqueRing() : OBRingSearch
• Seed() : OBRandom
• seekoff() : FilteringInputStreambuf
• seekpos() : FilteringInputStreambuf
• SelectRootAtoms() : OBAromaticTyper
• Separate() : OBMol

-s- 1284
Open Babel: API Documentation
• Set() : OBRotor , matrix3x3 , vector3 , OBBond
• SetAlias() : AliasData
• SetAngle() : OBTorsion , OBAngle
• SetAntiClockwiseStereo() : OBAtom
• SetAromatic() : OBAtom , OBBond
• SetAromaticCorrected() : OBMol
• SetAromaticPerceived() : OBMol
• SetAtom() : OBExternalBond
• SetAtom4Refs() : OBChiralData
• SetAtomicNum() : OBAtom
• SetAtomID() : OBResidue
• SetAtoms() : OBAngle
• SetAtomTypesPerceived() : OBMol
• SetAttribute() : OBGenericData
• SetAutomaticFormalCharge() : OBMol
• SetAutomaticPartialCharge() : OBMol
• SetAuxConv() : OBConversion
• SetBaseCoordinateSets() : OBRotamerList
• SetBegin() : OBBond
• SetBit() : OBFingerprint
• SetBitOff() : OBBitVec
• SetBitOn() : OBBitVec
• SetBO() : OBBond
• SetBond() : OBExternalBond , OBRotor
• SetBondOrder() : OBBond
• SetChain() : OBResidue
• SetChainNum() : OBResidue
• SetChainsPerceived() : OBMol
• SetChiral() : OBAtom
• SetChiralityPerceived() : OBMol
• SetClockwiseStereo() : OBAtom
• SetClosure() : OBBond
• SetClosureBondsPerceived() : OBMol
• SetCoeff() : OBNasaThermoData
• SetColumn() : matrix3x3
• SetComment() : OBReaction
• SetConformer() : OBMol
• SetConformers() : OBForceField , OBMol
• SetConstraints() : OBForceField
• SetCoordinates() : OBForceField , OBMol
• SetCoordPtr() : OBAtom
• SetCorrectedForPH() : OBMol
• SetCurrentCoordinates() : OBRotamerList
• SetData() : OBBase , OBCommentData , OBExternalBondData , OBSetData , OBRingData ,
OBUnitCell , OBConformerData , OBSymmetryData , OBTorsion , OBTorsionData , OBAngleData ,
OBSerialNums , OBVibrationData , OBRotationData , OBVectorData , OBMatrixData
• SetDelta() : OBRotorRule , OBRotor
• SetDihedralAtoms() : OBRotor
• SetDimension() : OBConformerData , OBMol
• SetDisplacements() : OBConformerData
• SetDown() : OBBond

-s- 1285
Open Babel: API Documentation
• SetEfficiency() : OBRateData
• SetElectrostaticCutOff() : OBForceField
• SetEnd() : OBBond
• SetEnergies() : OBConformerData , OBMol
• SetEnergy() : OBMol
• SetEnvironmentVariable() : OBGlobalDataBase
• SetEvalAtoms() : OBRotor , OBRotorList
• SetExpandedAtoms() : AliasData
• SetFactor() : OBFFConstraints
• SetFilename() : OBRotorRules
• SetFirstInput() : OBConversion
• SetFixAtom() : OBForceField
• SetFixAtoms() : OBRotorList
• SetFixedAtoms() : OBRotor
• SetFlag() : OBAtom , OBBond , OBMol
• SetFlags() : OBMol
• SetForces() : OBConformerData
• SetFormalCharge() : OBAtom
• SetFormalCharges() : OBForceField
• SetFormula() : OBMol
• SetFromType() : OBTypeTable
• SetGradient() : OBForceField
• SetGridType() : OBProxGrid
• SetHallName() : SpaceGroup
• SetHash() : OBBond
• SetHetAtom() : OBResidue
• SetHiT() : OBNasaThermoData
• SetHMName() : SpaceGroup
• SetHyb() : OBAtom
• SetHybAndGeom() : OBAtom
• SetHybridizationPerceived() : OBMol
• SetHydrogensAdded() : OBMol
• SetId() : SpaceGroup
• SetIdx() : OBAtom , OBBond , OBExternalBond , OBResidue , OBRotor
• SetIgnoreAtom() : OBForceField
• SetImplicitValence() : OBAtom
• SetImplicitValencePerceived() : OBMol
• SetInAndOutFormats() : OBConversion
• SetInFormat() : OBConversion
• SetInRing() : OBAtom , OBBond
• SetInStream() : OBConversion
• SetInternalCoord() : OBMol
• SetIsotope() : OBAtom
• SetKDouble() : OBBond
• SetKekulePerceived() : OBMol
• SetKSingle() : OBBond
• SetKTriple() : OBBond
• SetLast() : OBConversion
• SetLatticeType() : OBUnitCell
• SetLength() : OBBond
• SetLimits() : OBFloatGrid , OBGridData

-s- 1286
Open Babel: API Documentation
• SetLineSearchType() : OBForceField
• SetLocale() : OBLocale
• SetLogFile() : OBForceField
• SetLogLevel() : OBForceField
• SetLoRate() : OBRateData
• SetLoT() : OBNasaThermoData
• SetMaxLogEntries() : OBMessageHandler
• SetMidT() : OBNasaThermoData
• SetMoreFilesToCome() : OBConversion
• SetName() : OBResidue
• SetNegativeStereo() : OBAtom
• SetNum() : OBResidue
• SetNumberOfPoints() : OBFloatGrid , OBGridData
• SetNumCoords() : OBRotor
• SetNumSymmetries() : OBGridData
• SetOffset() : OBUnitCell
• SetOneObjectOnly() : OBConversion
• SetOptions() : OBConversion
• SetOrigin() : OBGenericData
• SetOutFormat() : OBConversion
• SetOutputIndex() : OBConversion
• SetOutputLevel() : OBMessageHandler
• SetOutputStream() : OBMessageHandler
• SetOutStream() : OBConversion
• SetParameterFile() : OBForceField
• SetParent() : OBAtom , OBBond , OBRing
• SetPartialCharge() : OBAtom
• SetPartialCharges() : OBForceField
• SetPartialChargesPerceived() : OBMol
• SetPhase() : OBNasaThermoData
• SetPointGroup() : OBSymmetryData
• SetPositiveStereo() : OBAtom
• SetQuiet() : OBRotorList
• SetRangeOff() : OBBitVec
• SetRangeOn() : OBBitVec
• SetRate() : OBRateData
• SetReadDirectory() : OBGlobalDataBase
• SetResidue() : OBAtom
• SetResName() : OBResidueData
• SetReversible() : OBReaction
• SetRingAtomsAndBondsPerceived() : OBMol
• SetRingTypesPerceived() : OBMol
• SetRotAtoms() : OBRotor , OBRotorList
• SetRotAtomsByFix() : OBRotorList
• SetRotor() : OBRotor
• SetRow() : matrix3x3
• SetSerialNum() : OBResidue
• SetSource() : FilteringInputStreambuf
• SetSpaceGroup() : OBUnitCell , OBSymmetryData
• SetSpinMultiplicity() : OBAtom
• SetSpinMultiplicityAssigned() : OBMol

-s- 1287
Open Babel: API Documentation
• SetSSSRPerceived() : OBMol
• SetStartAndEnd() : OBConversion
• SetTitle() : OBMol , OBReaction , OBMol
• SetToAngle() : OBRotor
• SetTorsion() : OBMol
• SetTorsionValues() : OBRotor
• SetTotalCharge() : OBMol
• SetTotalSpinMultiplicity() : OBMol
• SetToType() : OBTypeTable
• SetTransitionState() : OBReaction
• SetTroeParams() : OBRateData
• SetType() : OBAtom , OBRing , OBAtom , OBScoreGrid , OBRing
• SetTypes() : OBForceField
• SetUnit() : OBGridData
• SetUnrestricted() : OBGridData
• Setup() : OBScoreGrid , OBRotorList , OBRotamerList , OBScoreGrid , OBProxGrid ,
OBFFConstraints , OBForceField , OBProxGrid , OBPointGroup , OBRotamerList
• SetUp() : OBBond
• SetupCalculations() : OBForceField
• SetUpdateFrequency() : OBForceField
• SetupPointers() : OBFFCalculation4 , OBFFCalculation2 , OBFFCalculation3 , OBForceField
• SetupReader() : XMLConversion
• SetupRotMat() : matrix3x3
• SetupWriter() : XMLConversion
• SetVals() : OBFloatGrid
• SetValue() : OBPairData , OBPairTemplate , OBFloatGrid , OBPairData , OBGridData
• SetValues() : GasteigerState , OBGridData
• SetVDWCutOff() : OBForceField
• SetVector() : OBAtom
• SetVelocities() : OBConformerData
• SetVerbose() : OBScoreGrid
• SetWedge() : OBBond
• SetX() : vector3
• SetXAxis() : OBFloatGrid
• SetY() : vector3
• SetYAxis() : OBFloatGrid
• SetZ() : vector3
• SetZAxis() : OBFloatGrid
• size() : OBAtomClassData
• Size() : OBRotorList , OBFFConstraints , OBRing , OBRotor
• SkipObjects() : OBFormat , XMLBaseFormat
• SkipXML() : XMLConversion
• Sleep() : DLHandler
• SmallestBondAngle() : OBAtom
• SortByIndex() : OBAngle
• SortRings() : OBRingSearch
• SpaceGroup() : SpaceGroup
• SpecificationURL() : OBFormat
• Sqrt() : OBSqrtTbl
• Start() : OBStopwatch
• start_kekulize() : OBMol

-s- 1288
Open Babel: API Documentation
• StartErrorWrap() : OBMessageHandler
• StartLogging() : OBMessageHandler
• SteepestDescent() : OBForceField
• SteepestDescentInitialize() : OBForceField
• SteepestDescentTakeNSteps() : OBForceField
• StopErrorWrap() : OBMessageHandler
• StopLogging() : OBMessageHandler
• StripSalts() : OBMol
• Swap() : OBBuilder
• sync() : FilteringInputStreambuf , obLogBuf
• SystematicRotorSearch() : OBForceField
• SystematicRotorSearchInitialize() : OBForceField
• SystematicRotorSearchNextConformer() : OBForceField

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b

-s- 1289
Open Babel: API Documentation
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-t-

• Tanimoto() : OBFingerprint
• TargetClassDescription() : OBFormat
• ThrowError() : OBMessageHandler
• TimeSeed() : OBRandom
• ToInertialFrame() : OBMol
• ToVecInt() : OBBitVec
• Transform() : SpaceGroup
• transform3d() : transform3d
• Translate() : OBTypeTable , OBMol
• transpose() : matrix3x3
• TraverseCycle() : OBAromaticTyper
• triple() : triple
• type_to_int() : patty
• TypeID() : OBOp , OBFormat , OBDescriptor , OBForceField

-t- 1290
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p

-t- 1291
Open Babel: API Documentation
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-u-

• underflow() : FilteringInputStreambuf
• UnsetAromatic() : OBAtom , OBBond
• UnsetAromaticPerceived() : OBMol
• UnsetDown() : OBBond
• UnsetFixAtom() : OBForceField
• UnsetFlag() : OBMol , OBBond
• UnsetHash() : OBBond
• UnsetHydrogensAdded() : OBMol
• UnsetIgnoreAtom() : OBForceField
• UnsetImplicitValencePerceived() : OBMol
• UnsetKekule() : OBBond
• UnsetPartialChargesPerceived() : OBMol
• UnsetRingTypesPerceived() : OBMol
• UnsetSSSRPerceived() : OBMol
• UnsetStereo() : OBAtom
• UnsetUp() : OBBond
• UnsetWedge() : OBBond
• UpdateConformers() : OBForceField
• UpdateCoordinates() : OBForceField
• UpdatePairsSimple() : OBForceField

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:

-u- 1292
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-u- 1293
Open Babel: API Documentation

-v-

• Validate() : OBForceField
• ValidateConjugateGradients() : OBForceField
• ValidateGradientError() : OBForceField
• ValidateGradients() : OBForceField
• ValidateLineSearch() : OBForceField
• ValidateSteepestDescent() : OBForceField
• vector3() : vector3
• VectorAdd() : OBForceField
• VectorAngle() : OBForceField
• VectorAngleDerivative() : OBForceField
• VectorBondDerivative() : OBForceField
• VectorClear() : OBForceField
• VectorCopy() : OBForceField
• VectorCross() : OBForceField
• VectorDistance() : OBForceField
• VectorDistanceDerivative() : OBForceField
• VectorDivide() : OBForceField
• VectorDot() : OBForceField
• VectorLength() : OBForceField
• VectorLengthDerivative() : OBForceField
• VectorMultiply() : OBForceField
• VectorNormalize() : OBForceField
• VectorOOP() : OBForceField
• VectorOOPDerivative() : OBForceField
• VectorSelfMultiply() : OBForceField
• VectorSubtract() : OBForceField
• VectorTorsion() : OBForceField
• VectorTorsionDerivative() : OBForceField

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

-v- 1294
Open Babel: API Documentation
• Related Pages
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-v- 1295
Open Babel: API Documentation

-w-

• WeightedRotorSearch() : OBForceField
• WorksWith() : OBOp , OpTransform
• Write() : OBScoreGrid , OBConversion
• WriteChemObject() : XMLMoleculeFormat , OBFormat , OBMoleculeFormat
• WriteChemObjectImpl() : OBMoleculeFormat
• WriteFile() : OBConversion
• WriteMapList() : OBSmartsPattern
• WriteMolecule() : OBFormat
• writer() : XMLBaseFormat
• WriteRings() : OBRingSearch
• WriteStream() : XMLConversion
• WriteString() : OBConversion

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

-w- 1296
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-x-

• x() : OBAtom , vector3


• XMLConversion() : XMLConversion

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.

-x- 1297
Open Babel: API Documentation

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•a
•b
•c
•d
•e
•f
•g
•h
•i
•j
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•x
•y
•z
•~

-x- 1298
Open Babel: API Documentation

-y-

• y() : OBAtom , vector3

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

• OBAngleData : OBAngle
• OBAtom : OBChiralData
• OBMol : OBTorsionData , OBAngle , OBTorsion , OBAngleData , OBChiralData
• OBTorsionData : OBTorsion
• operator & : OBBitVec
• operator* : matrix3x3
• operator- : OBBitVec
• operator< : OBBitVec
• operator<< : matrix3x3 , OBError , OBFloatGrid , OBBitVec

-y- 1299
Open Babel: API Documentation

• operator== : OBBitVec
• operator>> : OBFloatGrid , OBBitVec
• operator^ : OBBitVec
• operator| : 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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

• first_type : triple , quad


• fourth_type : quad
• LErdbuf : OBConversion
• NameIndexType : OBMoleculeFormat
• NsMapType : XMLConversion
• OPAMapType : OBConversion
• OpMap : OBOp
• PluginIterator : OBPlugin
• PluginMapType : OBPlugin

-y- 1300
Open Babel: API Documentation

• second_type : triple , quad


• third_type : triple , quad
• word_vector : 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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m

-y- 1301
Open Babel: API Documentation

•n
•o
•p
•q
•r
•s
•t
•v
•w

-_-

• _a : OBFFParameter , OBUnitCell , OBInternalCoord


• _aakey : OBResidue
• _ads : OBTorsion
• _alias : AliasData
• _alpha : OBUnitCell
• _ang : OBInternalCoord
• _angles : OBAngleData
• _atom4refc : OBChiralData
• _atom4refo : OBChiralData
• _atom4refs : OBChiralData
• _atomid : OBResidue
• _atoms : OBResidue
• _attr : OBGenericData
• _autoFormalCharge : OBMol
• _autoPartialCharge : OBMol
• _b : OBFFParameter , OBUnitCell , OBInternalCoord
• _bc : OBTorsion
• _beta : OBUnitCell
• _bgn : OBBond , OBVirtualBond
• _c : OBAtom , OBFFParameter , OBUnitCell , OBInternalCoord , OBMol
• _chain : OBResidue
• _cidx : OBAtom
• _constraints : OBForceField
• _cstep : OBForceField
• _current_conformer : OBForceField
• _cutoff : OBForceField
• _d : OBFFParameter
• _data : OBCommentData
• _dataptr : OBGlobalDataBase
• _dimension : OBMol
• _dir : OBGlobalDataBase
• _dpar : OBFFParameter
• _dst : OBInternalCoord
• _e_n1 : OBForceField
• _econv : OBForceField
• _ele : OBAtom
• _elepairs : OBForceField

-_- 1302
Open Babel: API Documentation
• _embedlevel : XMLBaseFormat
• _end : OBBond , OBVirtualBond
• _energies : OBForceField
• _energy : OBMol
• _envvar : OBGlobalDataBase
• _errorMsg : OBError
• _expandedatoms : AliasData
• _explanation : OBError
• _fcharge : OBAtom
• _filename : OBGlobalDataBase
• _filterStreamBuf : OBMessageHandler
• _fixAtom : OBForceField
• _flags : OBAtom , OBBond , OBMol
• _gamma : OBUnitCell
• _grad1 : OBForceField
• _gradientPtr : OBForceField
• _gridtype : OBProxGrid
• _growbond : OBSmartsPattern
• _halfSpace : OBFloatGrid
• _hetatm : OBResidue
• _hyb : OBAtom
• _id : OBPlugin
• _idx : OBAtom , OBBond , OBResidue
• _ignoreAtom : OBForceField
• _impval : OBAtom
• _inc : OBProxGrid
• _init : OBGlobalDataBase , OBForceField
• _interGroup : OBForceField
• _interGroups : OBForceField
• _internals : OBMol
• _intraGroup : OBForceField
• _inv_spa : OBFloatGrid
• _inWrapStreamBuf : OBMessageHandler
• _ipar : OBFFParameter
• _isotope : OBAtom
• _ival : OBFloatGrid
• _lattice : OBUnitCell
• _level : OBError
• _linesearch : OBForceField
• _logbuf : OBForceField
• _logging : OBMessageHandler
• _loglvl : OBForceField
• _logos : OBForceField
• _map : OBAtomClassData , OBSSMatch
• _matrix : OBMatrixData
• _maxEntries : OBMessageHandler
• _maxinc : OBProxGrid
• _messageCount : OBMessageHandler
• _messageList : OBMessageHandler
• _method : OBError
• _midx : OBFloatGrid

-_- 1303
Open Babel: API Documentation
• _midy : OBFloatGrid
• _midz : OBFloatGrid
• _mlist : OBSmartsPattern
• _mod : OBMol
• _mol : OBForceField , OBSSMatch
• _natoms : OBMol
• _nbonds : OBMol
• _ncoords : OBForceField
• _nsteps : OBForceField
• _nxinc : OBProxGrid
• _nyinc : OBProxGrid
• _nzinc : OBProxGrid
• _offset : OBUnitCell
• _ord : OBVirtualBond
• _order : OBBond
• _origLogLevel : OBForceField
• _outputLevel : OBMessageHandler
• _outputStream : OBMessageHandler
• _pairfreq : OBForceField
• _parent : OBAtom , OBBond
• _parFile : OBForceField
• _pat : OBSmartsPattern , OBSSMatch
• _path : OBRing
• _pathset : OBRing
• _pcharge : OBAtom
• _pmol : XMLMoleculeFormat
• _pointGroup : OBSymmetryData
• _possibleCause : OBError
• _prefix : XMLBaseFormat
• _pxmlConv : XMLBaseFormat
• _radians : OBAngle
• _rele : OBForceField
• _residue : OBAtom , OBMol
• _reskey : OBResidue
• _resname : OBResidue
• _resnum : OBResidue
• _rvdw : OBForceField
• _serialMap : OBSerialNums
• _sernum : OBResidue
• _SkipNextRead : XMLConversion
• _source : OBGenericData
• _spaceGroup : OBUnitCell , OBSymmetryData
• _spaceGroupName : OBUnitCell
• _spacing : OBFloatGrid
• _spinmultiplicity : OBAtom
• _stereo : OBVirtualBond
• _str : OBSmartsPattern
• _subdir : OBGlobalDataBase
• _suggestedRemedy : OBError
• _temp : OBForceField
• _termini : OBAngle

-_- 1304
Open Babel: API Documentation
• _timestep : OBForceField
• _title : OBMol
• _tor : OBInternalCoord
• _torsions : OBTorsionData
• _totalCharge : OBMol
• _totalSpin : OBMol
• _type : OBGenericData , OBAtom
• _uatoms : OBSSMatch
• _v : OBAtom
• _v1 : OBUnitCell
• _v2 : OBUnitCell
• _v3 : OBUnitCell
• _validSetup : OBForceField
• _value : OBPairData , OBPairTemplate
• _values : OBFloatGrid
• _vatom : OBMol
• _vbond : OBAtom , OBMol
• _vconf : OBMol
• _vdata : OBSetData
• _vData : OBConformerData
• _vdata : OBBase
• _vDimension : OBConformerData
• _vDisplace : OBConformerData
• _vdwpairs : OBForceField
• _vec : OBVectorData
• _velocityPtr : OBForceField
• _vEnergies : OBConformerData
• _vertex : OBAngle
• _vexbnd : OBExternalBondData
• _vForces : OBConformerData
• _vFrequencies : OBVibrationData
• _vIntensities : OBVibrationData
• _vLx : OBVibrationData
• _vr : OBRingData
• _vVelocity : OBConformerData
• _xAxis : OBFloatGrid
• _xdim : OBFloatGrid
• _xmax : OBGrid
• _xmin : OBGrid
• _yAxis : OBFloatGrid
• _ydim : OBFloatGrid
• _ymax : OBGrid
• _ymin : OBGrid
• _zAxis : OBFloatGrid
• _zdim : OBFloatGrid
• _zmax : OBGrid
• _zmin : OBGrid

-_- 1305
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q

-_- 1306
Open Babel: API Documentation
•r
•s
•t
•v
•w

-l-

• leaf : _AtomExpr , _BondExpr


• lft : _BondExpr , _AtomExpr
• lo : DoubleType
• LoRates : OBRateData
• LoT : OBNasaThermoData

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

-l- 1307
Open Babel: API Documentation
•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-m-

• m_IsFirstInput : OBConversion
• m_IsLast : OBConversion
• MidT : OBNasaThermoData
• mon : _AtomExpr , _BondExpr
• MoreFilesToCome : OBConversion

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

-m- 1308
Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-n-

• NeedToFreeInStream : OBConversion
• NeedToFreeOutStream : OBConversion
• nEntries : FptIndexHeader
• nsdecl : XMLBaseFormat

-n- 1309
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q

-n- 1310
Open Babel: API Documentation
•r
•s
•t
•v
•w

-o-

• OneObjectOnly : OBConversion
• OptionsArray : OBConversion

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a

-o- 1311
Open Babel: API Documentation
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-a-

• a : OBFFParameter , OBFFCalculation2 , GasteigerState , OBFFConstraint


• aalloc : Pattern
• acount : Pattern
• arg : _BondExpr , _AtomExpr
• atom : Pattern

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

-a- 1312
Open Babel: API Documentation
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-b-

• b : OBFFParameter , OBFFCalculation2 , GasteigerState , OBFFConstraint


• balloc : Pattern
• baseindent : XMLBaseFormat
• bcount : Pattern
• bin : _AtomExpr , _BondExpr
• bond : Pattern

-b- 1313
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q

-b- 1314
Open Babel: API Documentation
•r
•s
•t
•v
•w

-c-

• c : OBFFParameter , OBFFCalculation3 , GasteigerState , OBFFConstraint


• cell : OBProxGrid
• CheckedForGzip : OBConversion
• chi : GasteigerState
• chiral_flag : AtomSpec
• Coeffs : OBNasaThermoData
• constraint_value : OBFFConstraint
• Count : OBConversion

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

• All
• Functions
• Variables
• Typedefs

-c- 1315
Open Babel: API Documentation
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-d-

• d : OBFFParameter , OBFFCalculation4 , OBLocale , OBPointGroup , OBFFConstraint


• datafilename : FptIndexHeader
• denom : GasteigerState
• dst : BondSpec

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.

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

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-e-

• Efficiencies : OBRateData
• EndNumber : OBConversion
• energy : OBFFCalculation2
• expr : BondSpec , AtomSpec

-e- 1317
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q

-e- 1318
Open Babel: API Documentation
•r
•s
•t
•v
•w

-f-

• factor : OBFFConstraint
• first : triple , quad
• force_a : OBFFCalculation2
• force_b : OBFFCalculation2
• force_c : OBFFCalculation3
• force_d : OBFFCalculation4
• FormatFilesLoaded : OBConversion
• fourth : quad
• fpid : FptIndexHeader
• fptdata : FptIndex

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

• All
• Functions

-f- 1319
Open Babel: API Documentation
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-g-

• grada : OBFFConstraint
• gradb : OBFFConstraint
• gradc : OBFFConstraint
• gradd : OBFFConstraint
• gridtype : OBScoreGrid
• grow : BondSpec

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

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

-g- 1320
Open Babel: API Documentation

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-g- 1321
Open Babel: API Documentation

-h-

• hasExplicitH : Pattern
• header : FptIndex
• headerlength : FptIndexHeader
• hi : DoubleType
• HiT : OBNasaThermoData

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f

-h- 1322
Open Babel: API Documentation
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-i-

• ia : OBFFConstraint
• ib : OBFFConstraint
• ic : OBFFConstraint
• id : OBFFConstraint
• idx_a : OBFFCalculation2
• idx_b : OBFFCalculation2
• idx_c : OBFFCalculation3
• idx_d : OBFFCalculation4
• ind : XMLBaseFormat
• Index : OBConversion
• InFilename : OBConversion
• ischiral : Pattern

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

-i- 1323
Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-p-

• parity : OBChiralData
• part : AtomSpec
• parts : Pattern
• pAuxConv : OBConversion
• pDefaultFormat : OBConversion
• phase : OBNasaThermoData
• pInFormat : OBConversion
• pInStream : OBConversion

-p- 1324
Open Babel: API Documentation
• pLineEndBuf : OBConversion
• pOb1 : OBConversion
• pos_a : OBFFCalculation2
• pos_b : OBFFCalculation2
• pos_c : OBFFCalculation3
• pos_d : OBFFCalculation4
• pOutFormat : OBConversion
• pOutStream : OBConversion
• prop : _AtomExpr , _BondExpr

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e

-p- 1325
Open Babel: API Documentation
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-q-

• q : GasteigerState

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

• All

-q- 1326
Open Babel: API Documentation
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-r-

• rab0 : OBFFConstraint
• Rates : OBRateData
• rbc0 : OBFFConstraint
• ReactionType : OBRateData
• ReadyToInput : OBConversion
• recur : _AtomExpr
• rgt : _BondExpr , _AtomExpr
• rInlen : OBConversion
• rInpos : OBConversion
• RotConsts : OBRotationData

-r- 1327
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-r- 1328
Open Babel: API Documentation

-s-

• score : OBScoreGrid
• second : triple , quad
• seekdata : FptIndex
• src : BondSpec
• StartNumber : OBConversion
• SupportedInputFormat : OBConversion
• SupportedOutputFormat : OBConversion
• SymNum : OBRotationData

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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c

-s- 1329
Open Babel: API Documentation
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-t-

• third : triple , quad


• TroeParams : OBRateData
• type : OBRotationData , OBFFConstraint , _AtomExpr , _BondExpr

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

-t- 1330
Open Babel: API Documentation
• Class Hierarchy
• Class Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-v-

• value : _AtomExpr , _BondExpr


• vb : AtomSpec
• verbose : OBScoreGrid
• visit : BondSpec
• Visit : OBBond , OBAtom
• visit : AtomSpec

-v- 1331
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

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator
• Related Functions

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•q
•r
•s
•t
•v
•w

-v- 1332
Open Babel: API Documentation

-w-

• wInlen : OBConversion
• wInpos : OBConversion
• words : FptIndexHeader

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

-w- 1333
generic.cpp File Reference
Handle OBGenericData classes. Custom data for atoms, bonds, etc. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <openbabel/mol.h>
#include <openbabel/generic.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/atomclass.h>
#include <openbabel/alias.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle OBGenericData classes. Custom data for atoms, bonds, etc.

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

generic.cpp File Reference 1334


generic.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 generic.h - Handle generic data classes. Custom data for atoms, bonds, etc.
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_GENERIC_H
00021 #define OB_GENERIC_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <string>
00026 #include <vector>
00027 #include <map>
00028
00029 #include <openbabel/math/spacegroup.h>
00030 #include <openbabel/obutil.h>
00031 #include <openbabel/base.h>
00032
00033 namespace OpenBabel
00034 {
00035
00036 // Forward declarations
00037 class OBBase;
00038 class OBAtom;
00039 class OBBond;
00040 class OBMol;
00041 class OBRing;
00042
00045 class OBAPI OBCommentData : public OBGenericData
00046 {
00047 protected:
00048 std::string _data;
00049 public:
00050 OBCommentData();
00051 OBCommentData(const OBCommentData&);
00052 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBCommentData(*this)
00053
00054 OBCommentData& operator=(const OBCommentData &src);
00055
00056 void SetData(const std::string &data)
00057 { _data = data; Trim(_data); }

generic.h 1335
Open Babel: API Documentation
00058 void SetData(const char *d)
00059 {_data = d; Trim(_data); }
00060 const std::string &GetData() const
00061 { return(_data); }
00062 virtual const std::string &GetValue() const
00063 { return(_data); }
00064 };
00065
00069 class OBAPI OBExternalBond
00070 {
00071 int _idx;
00072 OBAtom *_atom;
00073 OBBond *_bond;
00074 public:
00075 OBExternalBond(): _idx(0), _atom(NULL), _bond(NULL) {}
00076 OBExternalBond(OBAtom *,OBBond *,int);
00077 OBExternalBond(const OBExternalBond &);
00078 ~OBExternalBond() {}
00079
00080 int GetIdx() const { return(_idx); }
00081 OBAtom *GetAtom() const { return(_atom); }
00082 OBBond *GetBond() const { return(_bond); }
00083 void SetIdx(int idx) { _idx = idx; }
00084 void SetAtom(OBAtom *atom) { _atom = atom; }
00085 void SetBond(OBBond *bond) { _bond = bond; }
00086 };
00087
00090 class OBAPI OBExternalBondData : public OBGenericData
00091 {
00092 protected:
00093 std::vector<OBExternalBond> _vexbnd;
00094 public:
00095 OBExternalBondData();
00096
00097 //Copying is not used and too much work to set up
00098 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return NULL;}
00099
00100 void SetData(OBAtom*,OBBond*,int);
00101 std::vector<OBExternalBond> *GetData()
00102 {
00103 return(&_vexbnd);
00104 }
00105 };
00106
00112 class OBAPI OBPairData : public OBGenericData
00113 {
00114 protected:
00115 std::string _value;
00116 public:
00117 OBPairData();
00118 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00119 {return new OBPairData(*this);}
00120 void SetValue(const char *v) { _value = v; }
00121 void SetValue(const std::string &v) { _value = v; }
00122 virtual const std::string &GetValue() const
00123 { return(_value); }
00124 };
00125
00128 // More detailed description in generic.cpp
00129 template <class ValueT>
00130 class OBAPI OBPairTemplate : public OBGenericData

generic.h 1336
Open Babel: API Documentation
00131 {
00132 protected:
00133 ValueT _value;
00134 public:
00135 OBPairTemplate():
00136 OBGenericData("PairData", OBGenericDataType::PairData) {};
00137 void SetValue(const ValueT t) { _value = t; }
00138 virtual const ValueT &GetGenericValue() const { return(_value); }
00139 };
00140
00142 typedef OBPairTemplate<int> OBPairInteger;
00144 typedef OBPairTemplate<double> OBPairFloatingPoint;
00145
00149 class OBAPI OBSetData : public OBGenericData
00150 {
00151 protected:
00152 std::vector<OBGenericData *> _vdata;
00153 public:
00154 OBSetData() : OBGenericData("SetData", OBGenericDataType::SetData) {}
00155 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSetData(*this);}
00156
00158 void AddData(OBGenericData *d)
00159 {
00160 if(d)
00161 {
00162 _vdata.push_back(d);
00163 }
00164 }
00165
00167 void SetData(std::vector<OBGenericData *> &vdata)
00168 {
00169 _vdata = vdata;
00170 }
00171
00173 OBGenericData *GetData(const char *s)
00174 {
00175 std::vector<OBGenericData*>::iterator i;
00176
00177 for (i = _vdata.begin();i != _vdata.end();++i)
00178 if ((*i)->GetAttribute() == s)
00179 return(*i);
00180
00181 return(NULL);
00182 }
00183
00185 OBGenericData *GetData(const std::string &s)
00186 {
00187 std::vector<OBGenericData*>::iterator i;
00188
00189 for (i = _vdata.begin();i != _vdata.end();++i)
00190 if ((*i)->GetAttribute() == s)
00191 return(*i);
00192
00193 return(NULL);
00194 }
00195
00197 virtual const std::vector<OBGenericData *> &GetData() const //now virtual and const
00198 {
00199 return(_vdata);
00200 }
00201

generic.h 1337
Open Babel: API Documentation
00203 std::vector<OBGenericData*>::iterator GetBegin()
00204 {
00205 return _vdata.begin();
00206 }
00207
00209 std::vector<OBGenericData*>::iterator GetEnd()
00210 {
00211 return _vdata.end();
00212 }
00213
00215 void DeleteData(OBGenericData *gd)
00216 {
00217 std::vector<OBGenericData*>::iterator i;
00218 for (i = _vdata.begin();i != _vdata.end();++i)
00219 if (*i == gd)
00220 {
00221 delete *i;
00222 _vdata.erase(i);
00223 }
00224 }
00225
00226 }; // OBSetData
00227
00231 class OBAPI OBVirtualBond : public OBGenericData
00232 {
00233 protected:
00234 int _bgn;
00235 int _end;
00236 int _ord;
00237 int _stereo;
00238 public:
00239 OBVirtualBond();
00240 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBVirtualBond(*this)
00241 OBVirtualBond(int,int,int,int stereo=0);
00242 int GetBgn() { return(_bgn); }
00243 int GetEnd() { return(_end); }
00244 int GetOrder() { return(_ord); }
00245 int GetStereo() { return(_stereo); }
00246 };
00247
00250 class OBAPI OBRingData : public OBGenericData
00251 {
00252 protected:
00253 std::vector<OBRing*> _vr;
00254 public:
00255 OBRingData();
00256 OBRingData(const OBRingData &);
00257 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBRingData(*this);}
00258 ~OBRingData();
00259
00260 OBRingData &operator=(const OBRingData &);
00261
00262 void SetData(std::vector<OBRing*> &vr)
00263 {
00264 _vr = vr;
00265 }
00266 void PushBack(OBRing *r)
00267 {
00268 _vr.push_back(r);
00269 }
00270 std::vector<OBRing*> &GetData()

generic.h 1338
Open Babel: API Documentation
00271 {
00272 return(_vr);
00273 }
00274
00275 std::vector<OBRing*>::iterator BeginRings()
00276 { return(_vr.begin()); }
00277 std::vector<OBRing*>::iterator EndRings()
00278 { return(_vr.end()); }
00279 OBRing *BeginRing(std::vector<OBRing*>::iterator &i);
00280 OBRing *NextRing(std::vector<OBRing*>::iterator &i);
00281 };
00282
00287 class OBAPI OBUnitCell: public OBGenericData
00288 {
00289 public:
00290 enum LatticeType { Undefined,
00291 Triclinic,
00292 Monoclinic,
00293 Orthorhombic,
00294 Tetragonal,
00295 Rhombohedral ,
00296 Hexagonal,
00297 Cubic};
00298
00299
00300 protected:
00301 double _a, _b, _c, _alpha, _beta, _gamma;
00302 vector3 _offset;
00303 vector3 _v1, _v2, _v3;
00304 std::string _spaceGroupName;
00305 const SpaceGroup* _spaceGroup;
00306 LatticeType _lattice;
00307 public:
00309 OBUnitCell();
00310 OBUnitCell(const OBUnitCell &);
00311 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00312 {return new OBUnitCell(*this);}
00313 ~OBUnitCell() {}
00314
00315 OBUnitCell &operator=(const OBUnitCell &);
00316
00326 void SetData(const double a, const double b, const double c,
00327 const double alpha, const double beta, const double gamma)
00328 { _a = a; _b = b; _c = c;
00329 _alpha = alpha; _beta = beta; _gamma = gamma; }
00330 void SetData(const vector3 v1, const vector3 v2, const vector3 v3);
00331
00333 void SetOffset(const vector3 v1) { _offset = v1; }
00334
00337 void SetSpaceGroup(const SpaceGroup* sg) { _spaceGroup = sg; }
00338
00342 void SetSpaceGroup(const std::string sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (s
00343 _spaceGroupName = sg; }
00344
00350 void SetSpaceGroup(const int sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (sg); }
00351
00353 void SetLatticeType(const LatticeType lt) { _lattice = lt; }
00354
00357 void FillUnitCell(OBMol *);
00358
00360 double GetA() { return(_a); }

generic.h 1339
Open Babel: API Documentation
00362 double GetB() { return(_b); }
00364 double GetC() { return(_c); }
00366 double GetAlpha(){ return(_alpha);}
00368 double GetBeta() { return(_beta); }
00370 double GetGamma(){ return(_gamma);}
00372 vector3 GetOffset() { return(_offset); }
00373
00375 const SpaceGroup* GetSpaceGroup() { return(_spaceGroup); }
00376
00378 const std::string GetSpaceGroupName() { return(_spaceGroupName); }
00379
00381 LatticeType GetLatticeType( int spacegroup );
00382
00384 LatticeType GetLatticeType();
00385
00387 std::vector<vector3> GetCellVectors();
00389 matrix3x3 GetCellMatrix();
00391 matrix3x3 GetOrthoMatrix();
00393 matrix3x3 GetFractionalMatrix();
00394
00396 int GetSpaceGroupNumber( std::string name = "" );
00398 double GetCellVolume();
00399 };
00400
00406 class OBAPI OBConformerData: public OBGenericData
00407 {
00408 protected:
00410 std::vector<unsigned short> _vDimension;
00412 std::vector<double> _vEnergies;
00414 std::vector< std::vector< vector3 > > _vForces;
00416 std::vector< std::vector< vector3 > > _vVelocity;
00418 std::vector< std::vector< vector3 > > _vDisplace;
00420 std::vector<std::string> _vData;
00421
00422 public:
00423 OBConformerData();
00424 OBConformerData(const OBConformerData &);
00425 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBConformerData(*thi
00426 ~OBConformerData() {}
00427
00428 OBConformerData &operator=(const OBConformerData &);
00429
00430 void SetDimension(std::vector<unsigned short> vd) { _vDimension = vd; }
00431 void SetEnergies(std::vector<double> ve) { _vEnergies = ve; }
00432 void SetForces(std::vector< std::vector< vector3 > > vf) {_vForces = vf;}
00433 void SetVelocities(std::vector< std::vector< vector3 > > vv)
00434 { _vVelocity = vv; }
00435 void SetDisplacements(std::vector< std::vector< vector3 > > vd)
00436 { _vDisplace = vd; }
00437 void SetData(std::vector<std::string> vdat) { _vData = vdat; }
00438
00439 std::vector<unsigned short> GetDimension() { return _vDimension; }
00440 std::vector<double> GetEnergies() { return _vEnergies; }
00441 std::vector< std::vector< vector3 > > GetForces() {return _vForces; }
00442 std::vector< std::vector< vector3 > > GetVelocities()
00443 {return _vVelocity;}
00444 std::vector< std::vector< vector3 > > GetDisplacements()
00445 {return _vDisplace;}
00446 std::vector<std::string> GetData() { return _vData; }
00447
00448 };

generic.h 1340
Open Babel: API Documentation
00449
00454 class OBAPI OBSymmetryData: public OBGenericData
00455 {
00456 protected:
00457 std::string _spaceGroup;
00458 std::string _pointGroup;
00459 public:
00460 OBSymmetryData();
00461 OBSymmetryData(const OBSymmetryData &);
00462 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSymmetryData(*this
00463 ~OBSymmetryData() {}
00464
00465 OBSymmetryData &operator=(const OBSymmetryData &);
00466
00467 void SetData(std::string pg, std::string sg = "")
00468 { _pointGroup = pg; _spaceGroup = sg; }
00469 void SetPointGroup(std::string pg) { _pointGroup = pg; }
00470 void SetSpaceGroup(std::string sg) { _spaceGroup = sg; }
00471
00472 std::string GetPointGroup() { return _pointGroup; }
00473 std::string GetSpaceGroup() { return _spaceGroup; }
00474 };
00475
00479 class OBAPI OBTorsion
00480 {
00481 friend class OBMol;
00482 friend class OBTorsionData;
00483
00484 protected:
00485 std::pair<OBAtom*,OBAtom*> _bc;
00487 std::vector<triple<OBAtom*,OBAtom*,double> > _ads;
00488
00489 OBTorsion(): _bc(NULL, NULL) { }
00490 //protected for use only by friend classes
00491 OBTorsion(OBAtom *, OBAtom *, OBAtom *, OBAtom *);
00492
00493 std::vector<quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> > GetTorsions();
00494
00495 public:
00496 OBTorsion(const OBTorsion &);
00497 ~OBTorsion() {}
00498
00499 OBTorsion& operator=(const OBTorsion &);
00500
00501 void Clear();
00502 bool Empty() { return(_bc.first == 0 && _bc.second == 0); }
00503
00504 bool AddTorsion(OBAtom *a,OBAtom *b, OBAtom *c,OBAtom *d);
00505 bool AddTorsion(quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> &atoms);
00506
00507 bool SetAngle(double radians, unsigned int index = 0);
00508 bool SetData(OBBond * /*bond*/) { return false; }
00509
00510 bool GetAngle(double &radians, unsigned int index =0);
00513 unsigned int GetBondIdx();
00514 unsigned int GetSize() const { return _ads.size(); }
00515
00518 std::pair<OBAtom*,OBAtom*> GetBC()
00519 {
00520 return(_bc);
00521 }

generic.h 1341
Open Babel: API Documentation
00524 std::vector<triple<OBAtom*,OBAtom*,double> > GetADs()
00525 {
00526 return(_ads) ;
00527 }
00528
00529 bool IsProtonRotor();
00530 };
00531
00536 class OBAPI OBTorsionData : public OBGenericData
00537 {
00538 friend class OBMol;
00539
00540 protected:
00541 std::vector<OBTorsion> _torsions;
00542
00543 OBTorsionData();
00544 OBTorsionData(const OBTorsionData &);
00545
00546 public:
00547 OBTorsionData &operator=(const OBTorsionData &);
00548
00550 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00551 {return new OBTorsionData(*this);}
00552
00553 void Clear();
00554
00557 std::vector<OBTorsion> GetData() const
00558 {
00559 return _torsions;
00560 }
00561
00564 unsigned int GetSize() const
00565 {
00566 return _torsions.size();
00567 }
00568
00569 void SetData(OBTorsion &torsion);
00570
00571 bool FillTorsionArray(std::vector<std::vector<unsigned int> > &torsions);
00572 };
00573
00576 class OBAPI OBAngle
00577 {
00578 friend class OBMol;
00579 friend class OBAngleData;
00580
00581 protected:
00582
00583 //member data
00584
00585 OBAtom *_vertex;
00586 std::pair<OBAtom*,OBAtom*> _termini;
00587 double _radians;
00588
00589 //protected member functions
00590
00591 OBAngle(); //protect constructor for use only by friend classes
00592 OBAngle(OBAtom *vertex,OBAtom *a,OBAtom *b);
00593
00594 triple<OBAtom*,OBAtom*,OBAtom*> GetAtoms();
00595 void SortByIndex();

generic.h 1342
Open Babel: API Documentation
00596
00597 public:
00598
00599 OBAngle(const OBAngle &);
00600 ~OBAngle()
00601 {
00602 _vertex = NULL;
00603 }
00604
00605 OBAngle &operator = (const OBAngle &);
00606 bool operator ==(const OBAngle &);
00607
00608 void Clear();
00609
00612 double GetAngle() const
00613 {
00614 return(_radians);
00615 }
00618 void SetAngle(double angle)
00619 {
00620 _radians = angle;
00621 }
00622 void SetAtoms(OBAtom *vertex,OBAtom *a,OBAtom *b);
00623 void SetAtoms(triple<OBAtom*,OBAtom*,OBAtom*> &atoms);
00624
00625 };
00626
00629 class OBAPI OBAngleData : public OBGenericData
00630 {
00631 friend class OBMol;
00632
00633 protected:
00634 std::vector<OBAngle> _angles;
00635
00636 OBAngleData();
00637 OBAngleData(const OBAngleData &);
00639
00640 std::vector<OBAngle> GetData() const
00641 {
00642 return(_angles);
00643 }
00644
00645 public:
00646 OBAngleData &operator =(const OBAngleData &);
00647 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00648 {return new OBAngleData(*this);}
00649
00650 void Clear();
00651 unsigned int FillAngleArray(int **angles, unsigned int &size);
00652 bool FillAngleArray(std::vector<std::vector<unsigned int> > &angles);
00653
00654 void SetData(OBAngle &);
00657 unsigned int GetSize() const
00658 {
00659 return _angles.size();
00660 }
00661 };
00662
00663 enum atomreftype{
00664 output,
00665 input,

generic.h 1343
Open Babel: API Documentation
00666 calcvolume
00667 }; // sets which atom4ref is accessed by OBChiralData
00668
00671 class OBAPI OBChiralData : public OBGenericData
00672 {
00673 friend class OBMol;
00674 friend class OBAtom;
00675
00676 protected:
00677 std::vector<unsigned int> _atom4refs;
00678 std::vector<unsigned int> _atom4refo;
00679 std::vector<unsigned int> _atom4refc;
00680
00683 int parity;
00684
00685 public:
00686
00687 OBChiralData();
00688 OBChiralData(const OBChiralData &src);
00689 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00690 { return new OBChiralData(*this); }
00691 OBChiralData &operator =(const OBChiralData &);
00692 ~OBChiralData(){}
00693
00694 void Clear();
00695
00697 std::vector<unsigned int> GetAtom4Refs(atomreftype t) const;
00699 unsigned int GetAtomRef(int a,atomreftype t);
00700
00701 bool SetAtom4Refs(std::vector<unsigned int> atom4refs, atomreftype t);
00702 int AddAtomRef(unsigned int atomref, atomreftype t);
00703
00705 unsigned int GetSize(atomreftype t) const;
00706 };
00707
00710 class OBSerialNums : public OBGenericData
00711 {
00712 protected:
00713 std::map<int, OBAtom*> _serialMap;
00714
00715 public:
00716
00717 OBSerialNums() :
00718 OBGenericData("obSerialNums", OBGenericDataType::SerialNums)
00719 {}
00720
00721 OBSerialNums(const OBSerialNums &cp) : OBGenericData(cp)
00722 {
00723 _serialMap = cp._serialMap;
00724 }
00727 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00728 {return new OBSerialNums(*this);}
00729
00730 std::map<int,OBAtom*> &GetData() { return _serialMap; }
00731 void SetData(std::map<int,OBAtom*> &sm) { _serialMap = sm; }
00732
00733 };
00734
00737 class OBAPI OBVibrationData: public OBGenericData
00738 {
00739 protected:

generic.h 1344
Open Babel: API Documentation
00741 std::vector< std::vector< vector3 > > _vLx;
00742
00744 std::vector<double> _vFrequencies;
00745
00747 std::vector<double> _vIntensities;
00748
00749
00750 public:
00751 OBVibrationData(): OBGenericData("VibrationData", OBGenericDataType::VibrationData){}
00752 virtual ~OBVibrationData() {}
00753 virtual OBGenericData* Clone(OBBase*) const
00754 {return new OBVibrationData(*this);}
00755
00756 OBVibrationData & operator=(const OBVibrationData &);
00757
00758 void SetData(const std::vector< std::vector< vector3 > > &,
00759 const std::vector<double> &,
00760 const std::vector<double> &);
00761
00762 std::vector< std::vector< vector3 > > GetLx() const
00763 { return this->_vLx; }
00764 std::vector<double> GetFrequencies() const
00765 { return this->_vFrequencies; }
00766 std::vector<double> GetIntensities() const
00767 { return this->_vIntensities; }
00768
00769 unsigned int GetNumberOfFrequencies() const;
00770 };
00771
00774 class OBAPI OBRotationData: public OBGenericData
00775 {
00776 public:
00777 enum RType{UNKNOWN, ASYMMETRIC, SYMMETRIC, LINEAR};
00778 OBRotationData(): OBGenericData("RotationData", OBGenericDataType::RotationData){}
00779 virtual ~OBRotationData(){};
00780 virtual OBGenericData* Clone(OBBase*) const
00781 {return new OBRotationData(*this);}
00782 void SetData(RType RotorType, std::vector<double> RotationalConstants, int SymmetryNum
00783 {
00784 RotConsts = RotationalConstants;
00785 type = RotorType;
00786 SymNum = SymmetryNumber;
00787 }
00788
00790 std::vector<double> GetRotConsts()const{ return RotConsts; }
00791
00792 int GetSymmetryNumber()const{ return SymNum; }
00793 RType GetRotorType()const { return type; }
00794
00795 protected:
00796 std::vector<double> RotConsts;
00797 int SymNum;
00798 RType type;
00799 };
00800
00804 class OBAPI OBVectorData: public OBGenericData
00805 {
00806 public:
00807 OBVectorData(): OBGenericData("VectorData", OBGenericDataType::VectorData){}
00808 virtual ~OBVectorData(){};
00809 virtual OBGenericData* Clone(OBBase*) const

generic.h 1345
Open Babel: API Documentation
00810 {return new OBVectorData(*this);}
00811 void SetData(double x, double y, double z)
00812 { _vec = vector3(x, y, z); }
00813 void SetData(vector3 data)
00814 { _vec = data; }
00815 vector3 GetData() const
00816 { return _vec; }
00817
00818 protected:
00819 vector3 _vec;
00820 };
00821
00825 class OBAPI OBMatrixData: public OBGenericData
00826 {
00827 public:
00828 OBMatrixData(): OBGenericData("MatrixData", OBGenericDataType::MatrixData){}
00829 virtual ~OBMatrixData(){};
00830 virtual OBGenericData* Clone(OBBase*) const
00831 {return new OBMatrixData(*this);}
00832 void SetData(matrix3x3 data)
00833 { _matrix = data; }
00834 matrix3x3 GetData() const
00835 { return _matrix; }
00836
00837 protected:
00838 matrix3x3 _matrix;
00839 };
00840
00842 typedef std::vector<OBGenericData*>::iterator OBDataIterator;
00843
00844 } //end namespace OpenBabel
00845
00846 #endif // OB_GENERIC_H
00847

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

generic.h 1346
generic.h File Reference
Handle generic data classes. Custom data for atoms, bonds, etc. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <vector>
#include <map>
#include <openbabel/math/spacegroup.h>
#include <openbabel/obutil.h>
#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 OBCommentData
Used to store a comment string (can be multiple lines long).
More...
class OBExternalBond
Used to store information on an external bond (e.g., SMILES
fragments). More...
class OBExternalBondData
Used to store information on external bonds (e.g., in SMILES
fragments). More...
class OBPairData
Used to store arbitrary text attribute/value relationships.
More...

generic.h File Reference 1347


Open Babel: API Documentation
class OBPairTemplate
Used to store arbitrary attribute/value relationsips of any
type. More...
class OBSetData
Used to store arbitrary attribute/set relationships. Should be
used to store a set of OBGenericData based on an attribute.
More...
class OBVirtualBond
Used to temporarily store bonds that reference an atom that
has not yet been added to a molecule. More...
class OBRingData
Used to store the SSSR set (filled in by OBMol::GetSSSR()).
More...
class OBUnitCell
Used for storing information about periodic boundary
conditions with conversion to/from translation vectors and (a,
b, c, alpha, beta, gamma). More...
class OBConformerData
Used to hold data on conformers or geometry optimization
steps. More...
class OBSymmetryData
Used to hold the point-group and/or space-group symmetry.
More...
class OBTorsion
Used to hold the torsion data for a single rotatable bond and
all four atoms around it. More...
class OBTorsionData
Used to hold torsions as generic data for OBMol. More...
class OBAngle
Used to hold the 3 atoms in an angle and the angle itself.
More...
class OBAngleData
Used to hold all angles in a molecule as generic data for
OBMol. More...
class OBChiralData
Used to hold chiral inforamtion about the atom as
OBGenericData. More...
class OBSerialNums
Defines a map between serial numbers (e.g., in a PDB file)
and OBAtom objects inside a molecule. More...
class OBVibrationData
Used to hold the normal modes of a molecule, etc. More...
class OBRotationData
Used to hold the rotational constants and symmetry numbers.
More...
class OBVectorData
Used to hold a 3D vector item (e.g., a dipole moment).
More...
class OBMatrixData
Used to hold a 3x3 matrix item (e.g., a quadrupole moment).
More...

Classes 1348
Open Babel: API Documentation

Typedefs
typedef OBPairTemplate< int > OBPairInteger
typedef OBPairTemplate< double > OBPairFloatingPoint

Enumerations
enum atomreftype { output, input, calcvolume }

Detailed Description
Handle generic data classes. Custom data for atoms, bonds, etc.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d

Typedefs 1349
Open Babel: API Documentation
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-a-

• AA_ALA : residue.h
• AA_ARG : residue.h
• AA_ASN : residue.h
• AA_ASP : residue.h
• AA_CYS : residue.h
• AA_GLN : residue.h
• AA_GLU : residue.h
• AA_GLY : residue.h
• AA_HIS : residue.h
• AA_ILE : residue.h
• AA_LEU : residue.h
• AA_LYS : residue.h
• AA_MET : residue.h
• AA_PHE : residue.h
• AA_PRO : residue.h
• AA_SER : residue.h
• AA_THR : residue.h
• AA_TRP : residue.h
• AA_TYR : residue.h
• AA_VAL : residue.h
• AE_ANDHI : parsmart.cpp
• AE_ANDLO : parsmart.cpp
• AE_LEAF : parsmart.cpp
• AE_NOT : parsmart.cpp
• AE_OR : parsmart.cpp
• AE_RECUR : parsmart.cpp
• AI_C : chains.cpp
• AI_C1 : chains.cpp
• AI_C2 : chains.cpp
• AI_C3 : chains.cpp

Detailed Description 1350


Open Babel: API Documentation
• AI_C4 : chains.cpp
• AI_C5 : chains.cpp
• AI_CA : chains.cpp
• AI_N : chains.cpp
• AI_O : chains.cpp
• AI_O1P : chains.cpp
• AI_O2 : chains.cpp
• AI_O2P : chains.cpp
• AI_O3 : chains.cpp
• AI_O4 : chains.cpp
• AI_O5 : chains.cpp
• AI_OXT : chains.cpp
• AI_P : chains.cpp
• AL_ANTICLOCKWISE : parsmart.cpp
• AL_AROM : parsmart.cpp
• AL_CHIRAL : parsmart.cpp
• AL_CLOCKWISE : parsmart.cpp
• AL_CONNECT : parsmart.cpp
• AL_CONST : parsmart.cpp
• AL_DEGREE : parsmart.cpp
• AL_ELEM : parsmart.cpp
• AL_HCOUNT : parsmart.cpp
• AL_HYB : parsmart.cpp
• AL_IMPLICIT : parsmart.cpp
• AL_MASS : parsmart.cpp
• AL_NEGATIVE : parsmart.cpp
• AL_POSITIVE : parsmart.cpp
• AL_RINGCONNECT : parsmart.cpp
• AL_RINGS : parsmart.cpp
• AL_SIZE : parsmart.cpp
• AL_UNSPECIFIED : parsmart.cpp
• AL_VALENCE : parsmart.cpp
• AMINOMAX : chains.cpp
• ApproxZero : obutil.cpp
• asnprintf() : snprintf.h
• asprintf() : snprintf.h
• ATOMEXPRPOOL : parsmart.cpp
• ATOMMAX : chains.cpp
• ATOMMINAMINO : chains.cpp
• ATOMMINNUCLEIC : chains.cpp
• ATOMPOOL : parsmart.cpp

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

-a- 1351
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-k-

• KCAL_TO_KJ : forcefield.h

-k- 1352
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-k- 1353
Open Babel: API Documentation

Here is a list of all file members with links to the files they belong to:

-l-

• LoPart : rand.cpp
• LowBit : bitvec.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o

-l- 1354
Open Babel: API Documentation
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-m-

• M_PI : obutil.h , pointgroup.cpp


• MAKE_PLUGIN : plugin.h
• matchFiles() : dlhandler_unix.cpp
• MAX_SWEEPS : obutil.cpp
• MAXELEM : residue.h
• MAXFACT : rand.cpp
• MaxMonoAtom : chains.h
• MaxMonoBond : chains.h
• MAXNUCLEIC : chains.cpp
• MAXPARAM : pointgroup.cpp
• MAXPEPTIDE : chains.cpp
• MAXPRIMES : rand.cpp
• MAXRES : residue.h
• MAXSETNO : residue.h
• MINELEM : residue.h
• MINRES : residue.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:59 2008 by 1.5.6.

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

-m- 1355
Open Babel: API Documentation
• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-n-

• NO_SYMCLASS : canon.cpp
• NOTREADABLE : format.h
• NOTWRITABLE : format.h
• NUCLEOMAX : 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:

-n- 1356
Open Babel: API Documentation

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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-o-

• OB_3RING_ATOM : atom.h
• OB_4RING_ATOM : atom.h
• OB_ACCEPTOR_ATOM : atom.h
• OB_ACSTEREO_ATOM : atom.h
• OB_AROM_CORRECTED_MOL : mol.h
• OB_AROMATIC_ATOM : atom.h
• OB_AROMATIC_BOND : bond.h
• OB_AROMATIC_MOL : mol.h

-o- 1357
Open Babel: API Documentation
• OB_ATOM_HAS_NO_H : atom.h
• OB_ATOM_NOT_H_DEFICIENT : atom.h
• OB_ATOMTYPES_MOL : mol.h
• OB_BINARY_SETWORD : rotamer.cpp
• OB_CHAINS_MOL : mol.h
• OB_CHIRAL_ATOM : atom.h
• OB_CHIRALITY_MOL : mol.h
• OB_CLOSURE_BOND : bond.h
• OB_CLOSURE_MOL : mol.h
• OB_CSTEREO_ATOM : atom.h
• OB_CURRENT_CONFORMER : mol.h
• OB_DEFAULT_DELTA : rotor.cpp
• OB_DONOR_ATOM : atom.h
• OB_EVAL_STACKSIZE : parsmart.cpp
• OB_GASTEIGER_DAMP : molchrg.h
• OB_GASTEIGER_DENOM : molchrg.h
• OB_GASTEIGER_ITERS : molchrg.h
• OB_H_ADDED_MOL : mol.h
• OB_HASH_BOND : bond.h
• OB_HYBRID_MOL : mol.h
• OB_IMPVAL_MOL : mol.h
• OB_KDOUBLE_BOND : bond.h
• OB_KEKULE_MOL : mol.h
• OB_KSINGLE_BOND : bond.h
• OB_KTRIPLE_BOND : bond.h
• OB_NEG_CHIRAL_ATOM : atom.h
• OB_PCHARGE_MOL : mol.h
• OB_PH_CORRECTED_MOL : mol.h
• OB_POS_CHIRAL_ATOM : atom.h
• OB_RING_ATOM : atom.h
• OB_RING_BOND : bond.h
• OB_RINGFLAGS_MOL : mol.h
• OB_RINGTYPES_MOL : mol.h
• OB_RTREE_CUTOFF : ring.cpp
• OB_SSSR_MOL : mol.h
• OB_TCHARGE_MOL : mol.h
• OB_TITLE_SIZE : rotamer.cpp
• OB_TORDOWN_BOND : bond.h
• OB_TORUP_BOND : bond.h
• OB_TSPIN_MOL : mol.h
• OB_WEDGE_BOND : bond.h
• OBAtomIncrement : mol.cpp
• OBBondIncrement : mol.cpp
• OBFF_ANALYTICAL_GRADIENT : forcefield.h
• OBFF_CONST_ANGLE : forcefield.h
• OBFF_CONST_ATOM : forcefield.h
• OBFF_CONST_ATOM_X : forcefield.h
• OBFF_CONST_ATOM_Y : forcefield.h
• OBFF_CONST_ATOM_Z : forcefield.h
• OBFF_CONST_CHIRAL : forcefield.h
• OBFF_CONST_DISTANCE : forcefield.h

-o- 1358
Open Babel: API Documentation
• OBFF_CONST_IGNORE : forcefield.h
• OBFF_CONST_TORSION : forcefield.h
• OBFF_EANGLE : forcefield.h
• OBFF_EBOND : forcefield.h
• OBFF_EELECTROSTATIC : forcefield.h
• OBFF_ENERGY : forcefield.h
• OBFF_EOOP : forcefield.h
• OBFF_ESTRBND : forcefield.h
• OBFF_ETORSION : forcefield.h
• OBFF_EVDW : forcefield.h
• OBFF_LOGLVL_HIGH : forcefield.h
• OBFF_LOGLVL_LOW : forcefield.h
• OBFF_LOGLVL_MEDIUM : forcefield.h
• OBFF_LOGLVL_NONE : forcefield.h
• OBFF_NUMERICAL_GRADIENT : forcefield.h
• OBLipoGrid : grid.h
• OBMolToRWMol() : RDKitConv.h
• OBPolarGrid : grid.h
• ONE_OVER_SQRT3 : atom.cpp
• OneThird : obutil.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

-o- 1359
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-z-

• ZEROATOMSOK : format.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:59 2008 by 1.5.6.

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

• File List

-z- 1360
Open Babel: API Documentation
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-b-

• BC_ASSIGN : chains.cpp
• BC_COUNT : chains.cpp
• BC_ELEM : chains.cpp
• BC_EVAL : chains.cpp
• BC_IDENT : chains.cpp
• BC_LOCAL : chains.cpp
• BE_ANDHI : parsmart.h
• BE_ANDLO : parsmart.h
• BE_LEAF : parsmart.h
• BE_NOT : parsmart.h
• BE_OR : parsmart.h
• BF_AROMATIC : chains.cpp
• BF_DOUBLE : chains.cpp
• BF_NONRINGDOUBLE : parsmart.cpp
• BF_NONRINGDOWN : parsmart.cpp
• BF_NONRINGTRIPLE : parsmart.cpp
• BF_NONRINGUNSPEC : parsmart.cpp
• BF_NONRINGUP : parsmart.cpp
• BF_RINGAROM : parsmart.cpp

-b- 1361
Open Babel: API Documentation
• BF_RINGDOUBLE : parsmart.cpp
• BF_RINGDOWN : parsmart.cpp
• BF_RINGTRIPLE : parsmart.cpp
• BF_RINGUNSPEC : parsmart.cpp
• BF_RINGUP : parsmart.cpp
• BF_SINGLE : chains.cpp
• BF_TRIPLE : chains.cpp
• Bit05All : chains.cpp
• BitC : chains.cpp
• BitC1 : chains.cpp
• BitC2All : chains.cpp
• BitC2DNA : chains.cpp
• BitC2RNA : chains.cpp
• BitC3 : chains.cpp
• BitC4 : chains.cpp
• BitC5 : chains.cpp
• BitCA : chains.cpp
• BitCAAll : chains.cpp
• BitCAGly : chains.cpp
• BitCAll : chains.cpp
• BitCOXT : chains.cpp
• BitCTer : chains.cpp
• BitN : chains.cpp
• BitNAll : chains.cpp
• BitNPro : chains.cpp
• BitNPT : chains.cpp
• BitNTer : chains.cpp
• BitO : chains.cpp
• BitO2 : chains.cpp
• BitO3 : chains.cpp
• BitO3All : chains.cpp
• BitO3Ter : chains.cpp
• BitO4 : chains.cpp
• BitO5 : chains.cpp
• BitO5Ter : chains.cpp
• BitOAll : chains.cpp
• BitOP : chains.cpp
• BitOXT : chains.cpp
• BitP : chains.cpp
• BitPAll : chains.cpp
• BitPTer : chains.cpp
• BL_CONST : parsmart.h
• BL_TYPE : parsmart.h
• BONDEXPRPOOL : parsmart.cpp
• BONDPOOL : parsmart.cpp
• BothEven : rand.cpp
• BS_ALL : parsmart.cpp
• BS_AROM : parsmart.cpp
• BS_DEFAULT : parsmart.cpp
• BS_DOUBLE : parsmart.cpp
• BS_DOWN : parsmart.cpp

-b- 1362
Open Babel: API Documentation
• BS_DOWNUNSPEC : parsmart.cpp
• BS_RING : parsmart.cpp
• BS_SINGLE : parsmart.cpp
• BS_TRIPLE : parsmart.cpp
• BS_UP : parsmart.cpp
• BS_UPUNSPEC : parsmart.cpp
• BT_AROM : parsmart.h
• BT_DOUBLE : parsmart.h
• BT_DOWN : parsmart.h
• BT_DOWNUNSPEC : parsmart.h
• BT_RING : parsmart.h
• BT_SINGLE : parsmart.h
• BT_TRIPLE : parsmart.h
• BT_UP : parsmart.h
• BT_UPUNSPEC : parsmart.h
• BUFF_SIZE : dlhandler_unix.cpp , obconversion.cpp , mol.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d

-b- 1363
Open Babel: API Documentation
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-c-

• ChainsResName : chains.cpp
• CT_MATCH : canon.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All

-c- 1364
Open Babel: API Documentation
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-d-

• DEBUG : canon.cpp
• DEFAULTFORMAT : format.h
• DEG_TO_RAD : vector3.h , matrix3x3.h
• DIMENSION : pointgroup.cpp
• DOUBLE : kekulize.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-e-

• ELEMMAX : parsmart.cpp
• EQ : mol.h
• EQn : mol.h

-e- 1366
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-f-

• False : rand.cpp
• FILE_SEP_CHAR : tokenst.h
• FOR_ANGLES_OF_MOL : obiter.h

-f- 1367
Open Babel: API Documentation
• FOR_ATOMS_OF_MOL : obiter.h
• FOR_ATOMS_OF_RESIDUE : obiter.h
• FOR_BFS_OF_MOL : obiter.h
• FOR_BONDS_OF_ATOM : obiter.h
• FOR_BONDS_OF_MOL : obiter.h
• FOR_DFS_OF_MOL : obiter.h
• FOR_NBORS_OF_ATOM : obiter.h
• FOR_PAIRS_OF_MOL : obiter.h
• FOR_RESIDUES_OF_MOL : obiter.h
• FOR_RINGS_OF_MOL : obiter.h
• FOR_TORSIONS_OF_MOL : obiter.h
• FourThirdsPI : obutil.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i

-f- 1368
Open Babel: API Documentation
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-h-

• HiPart : rand.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a

-h- 1369
Open Babel: API Documentation
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-i-

• IF_OBFF_LOGLVL_HIGH : forcefield.h
• IF_OBFF_LOGLVL_LOW : forcefield.h
• IF_OBFF_LOGLVL_MEDIUM : forcefield.h
• IS_ACIDIC : residue.h
• IS_ACYCLIC : residue.h
• IS_ALIPHATIC : residue.h
• IS_AROMATIC : residue.h
• IS_BASIC : residue.h
• IS_BURIED : residue.h
• IS_CHARGED : residue.h
• IS_CYCLIC : residue.h
• IS_HYDROPHOBIC : residue.h
• IS_LARGE : residue.h
• IS_MEDIUM : residue.h
• IS_NEGATIVE : residue.h
• IS_NEUTRAL : residue.h
• IS_POLAR : residue.h
• IS_POSITIVE : residue.h
• IS_SMALL : residue.h
• IS_SURFACE : residue.h
• IsEven : rand.cpp
• IsOdd : rand.cpp
• IsPrime : rand.cpp
• IsUnsatType : mol.h
• IsZero : obutil.cpp

-i- 1370
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-i- 1371
Open Babel: API Documentation
Here is a list of all file members with links to the files they belong to:

-p-

• PI : obutil.cpp
• PointGroupsCount : pointgroup.cpp
• PORTABLE_SNPRINTF_VERSION_MAJOR : snprintf.h
• PORTABLE_SNPRINTF_VERSION_MINOR : snprintf.h
• PT_ACCEPTOR : patty.h
• PT_ANION : patty.h
• PT_CATION : patty.h
• PT_DONOR : patty.h
• PT_HYDROPHOBIC : patty.h
• PT_METAL : patty.h
• PT_OTHER : patty.h
• PT_POLAR : patty.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c

-p- 1372
Open Babel: API Documentation
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-r-

• RAD_TO_DEG : matrix3x3.h , vector3.h


• READBINARY : format.h
• READONEONLY : format.h
• READXML : format.h
• RESIDMAX : chains.cpp
• RESIDMIN : 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:59 2008 by 1.5.6.

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

-r- 1373
Open Babel: API Documentation
• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-s-

• SETWORD : bitvec.h
• SINGLE : kekulize.cpp
• snprintf() : snprintf.h
• SQRT_TWO_THIRDS : atom.cpp
• SQUARE : mol.h , rotor.h
• STACKSIZE : chains.cpp
• STARTWORDS : bitvec.h
• strncasecmp() : obconversion.cpp , data.cpp , atom.cpp

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

-s- 1374
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-t-

• True : rand.cpp
• TwoThirdsPI : obutil.cpp

-t- 1375
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-t- 1376
Open Babel: API Documentation

Here is a list of all file members with links to the files they belong to:

-v-

• vasnprintf() : snprintf.h
• vasprintf() : snprintf.h
• VC_EXTRALEAN : dlhandler_win32.cpp
• vsnprintf() : snprintf.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m

-v- 1377
Open Babel: API Documentation
•n
•o
•p
•r
•s
•t
•v
•w
•z

Here is a list of all file members with links to the files they belong to:

-w-

• WORDMASK : bitvec.h
• WORDROLL : bitvec.h
• WORDSIZE_OF_BITSIZE : bitvec.h
• WRITEBINARY : format.h
• WRITEONEONLY : format.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

-w- 1378
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-a-

• AA_ALA : residue.h
• AA_ARG : residue.h
• AA_ASN : residue.h
• AA_ASP : residue.h
• AA_CYS : residue.h
• AA_GLN : residue.h
• AA_GLU : residue.h
• AA_GLY : residue.h
• AA_HIS : residue.h
• AA_ILE : residue.h
• AA_LEU : residue.h
• AA_LYS : residue.h
• AA_MET : residue.h
• AA_PHE : residue.h
• AA_PRO : residue.h
• AA_SER : residue.h
• AA_THR : residue.h
• AA_TRP : residue.h
• AA_TYR : residue.h
• AA_VAL : residue.h
• AE_ANDHI : parsmart.cpp
• AE_ANDLO : parsmart.cpp
• AE_LEAF : parsmart.cpp
• AE_NOT : parsmart.cpp
• AE_OR : parsmart.cpp
• AE_RECUR : parsmart.cpp

-a- 1379
Open Babel: API Documentation
• AI_C : chains.cpp
• AI_C1 : chains.cpp
• AI_C2 : chains.cpp
• AI_C3 : chains.cpp
• AI_C4 : chains.cpp
• AI_C5 : chains.cpp
• AI_CA : chains.cpp
• AI_N : chains.cpp
• AI_O : chains.cpp
• AI_O1P : chains.cpp
• AI_O2 : chains.cpp
• AI_O2P : chains.cpp
• AI_O3 : chains.cpp
• AI_O4 : chains.cpp
• AI_O5 : chains.cpp
• AI_OXT : chains.cpp
• AI_P : chains.cpp
• AL_ANTICLOCKWISE : parsmart.cpp
• AL_AROM : parsmart.cpp
• AL_CHIRAL : parsmart.cpp
• AL_CLOCKWISE : parsmart.cpp
• AL_CONNECT : parsmart.cpp
• AL_CONST : parsmart.cpp
• AL_DEGREE : parsmart.cpp
• AL_ELEM : parsmart.cpp
• AL_HCOUNT : parsmart.cpp
• AL_HYB : parsmart.cpp
• AL_IMPLICIT : parsmart.cpp
• AL_MASS : parsmart.cpp
• AL_NEGATIVE : parsmart.cpp
• AL_POSITIVE : parsmart.cpp
• AL_RINGCONNECT : parsmart.cpp
• AL_RINGS : parsmart.cpp
• AL_SIZE : parsmart.cpp
• AL_UNSPECIFIED : parsmart.cpp
• AL_VALENCE : parsmart.cpp
• AMINOMAX : chains.cpp
• ApproxZero : obutil.cpp
• ATOMEXPRPOOL : parsmart.cpp
• ATOMMAX : chains.cpp
• ATOMMINAMINO : chains.cpp
• ATOMMINNUCLEIC : chains.cpp
• ATOMPOOL : parsmart.cpp

-a- 1380
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-k-

• KCAL_TO_KJ : forcefield.h

-k- 1381
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-k- 1382
Open Babel: API Documentation

-l-

• LoPart : rand.cpp
• LowBit : bitvec.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o

-l- 1383
Open Babel: API Documentation
•p
•r
•s
•t
•v
•w
•z

-m-

• M_PI : obutil.h , pointgroup.cpp


• MAKE_PLUGIN : plugin.h
• MAX_SWEEPS : obutil.cpp
• MAXELEM : residue.h
• MAXFACT : rand.cpp
• MaxMonoAtom : chains.h
• MaxMonoBond : chains.h
• MAXNUCLEIC : chains.cpp
• MAXPARAM : pointgroup.cpp
• MAXPEPTIDE : chains.cpp
• MAXPRIMES : rand.cpp
• MAXRES : residue.h
• MAXSETNO : residue.h
• MINELEM : residue.h
• MINRES : residue.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:59 2008 by 1.5.6.

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

-m- 1384
Open Babel: API Documentation
• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-n-

• NO_SYMCLASS : canon.cpp
• NOTREADABLE : format.h
• NOTWRITABLE : format.h
• NUCLEOMAX : 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:

-n- 1385
Open Babel: API Documentation

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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-o-

• OB_3RING_ATOM : atom.h
• OB_4RING_ATOM : atom.h
• OB_ACCEPTOR_ATOM : atom.h
• OB_ACSTEREO_ATOM : atom.h
• OB_AROM_CORRECTED_MOL : mol.h
• OB_AROMATIC_ATOM : atom.h
• OB_AROMATIC_BOND : bond.h
• OB_AROMATIC_MOL : mol.h

-o- 1386
Open Babel: API Documentation
• OB_ATOM_HAS_NO_H : atom.h
• OB_ATOM_NOT_H_DEFICIENT : atom.h
• OB_ATOMTYPES_MOL : mol.h
• OB_BINARY_SETWORD : rotamer.cpp
• OB_CHAINS_MOL : mol.h
• OB_CHIRAL_ATOM : atom.h
• OB_CHIRALITY_MOL : mol.h
• OB_CLOSURE_BOND : bond.h
• OB_CLOSURE_MOL : mol.h
• OB_CSTEREO_ATOM : atom.h
• OB_CURRENT_CONFORMER : mol.h
• OB_DEFAULT_DELTA : rotor.cpp
• OB_DONOR_ATOM : atom.h
• OB_EVAL_STACKSIZE : parsmart.cpp
• OB_GASTEIGER_DAMP : molchrg.h
• OB_GASTEIGER_DENOM : molchrg.h
• OB_GASTEIGER_ITERS : molchrg.h
• OB_H_ADDED_MOL : mol.h
• OB_HASH_BOND : bond.h
• OB_HYBRID_MOL : mol.h
• OB_IMPVAL_MOL : mol.h
• OB_KDOUBLE_BOND : bond.h
• OB_KEKULE_MOL : mol.h
• OB_KSINGLE_BOND : bond.h
• OB_KTRIPLE_BOND : bond.h
• OB_NEG_CHIRAL_ATOM : atom.h
• OB_PCHARGE_MOL : mol.h
• OB_PH_CORRECTED_MOL : mol.h
• OB_POS_CHIRAL_ATOM : atom.h
• OB_RING_ATOM : atom.h
• OB_RING_BOND : bond.h
• OB_RINGFLAGS_MOL : mol.h
• OB_RINGTYPES_MOL : mol.h
• OB_RTREE_CUTOFF : ring.cpp
• OB_SSSR_MOL : mol.h
• OB_TCHARGE_MOL : mol.h
• OB_TITLE_SIZE : rotamer.cpp
• OB_TORDOWN_BOND : bond.h
• OB_TORUP_BOND : bond.h
• OB_TSPIN_MOL : mol.h
• OB_WEDGE_BOND : bond.h
• OBAtomIncrement : mol.cpp
• OBBondIncrement : mol.cpp
• OBFF_ANALYTICAL_GRADIENT : forcefield.h
• OBFF_CONST_ANGLE : forcefield.h
• OBFF_CONST_ATOM : forcefield.h
• OBFF_CONST_ATOM_X : forcefield.h
• OBFF_CONST_ATOM_Y : forcefield.h
• OBFF_CONST_ATOM_Z : forcefield.h
• OBFF_CONST_CHIRAL : forcefield.h
• OBFF_CONST_DISTANCE : forcefield.h

-o- 1387
Open Babel: API Documentation
• OBFF_CONST_IGNORE : forcefield.h
• OBFF_CONST_TORSION : forcefield.h
• OBFF_EANGLE : forcefield.h
• OBFF_EBOND : forcefield.h
• OBFF_EELECTROSTATIC : forcefield.h
• OBFF_ENERGY : forcefield.h
• OBFF_EOOP : forcefield.h
• OBFF_ESTRBND : forcefield.h
• OBFF_ETORSION : forcefield.h
• OBFF_EVDW : forcefield.h
• OBFF_LOGLVL_HIGH : forcefield.h
• OBFF_LOGLVL_LOW : forcefield.h
• OBFF_LOGLVL_MEDIUM : forcefield.h
• OBFF_LOGLVL_NONE : forcefield.h
• OBFF_NUMERICAL_GRADIENT : forcefield.h
• OBLipoGrid : grid.h
• OBPolarGrid : grid.h
• ONE_OVER_SQRT3 : atom.cpp
• OneThird : obutil.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a

-o- 1388
Open Babel: API Documentation
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-z-

• ZEROATOMSOK : format.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:59 2008 by 1.5.6.

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

• File List
• File Members

-z- 1389
Open Babel: API Documentation
• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-b-

• BC_ASSIGN : chains.cpp
• BC_COUNT : chains.cpp
• BC_ELEM : chains.cpp
• BC_EVAL : chains.cpp
• BC_IDENT : chains.cpp
• BC_LOCAL : chains.cpp
• BE_ANDHI : parsmart.h
• BE_ANDLO : parsmart.h
• BE_LEAF : parsmart.h
• BE_NOT : parsmart.h
• BE_OR : parsmart.h
• BF_AROMATIC : chains.cpp
• BF_DOUBLE : chains.cpp
• BF_NONRINGDOUBLE : parsmart.cpp
• BF_NONRINGDOWN : parsmart.cpp
• BF_NONRINGTRIPLE : parsmart.cpp
• BF_NONRINGUNSPEC : parsmart.cpp
• BF_NONRINGUP : parsmart.cpp
• BF_RINGAROM : parsmart.cpp
• BF_RINGDOUBLE : parsmart.cpp
• BF_RINGDOWN : parsmart.cpp

-b- 1390
Open Babel: API Documentation
• BF_RINGTRIPLE : parsmart.cpp
• BF_RINGUNSPEC : parsmart.cpp
• BF_RINGUP : parsmart.cpp
• BF_SINGLE : chains.cpp
• BF_TRIPLE : chains.cpp
• Bit05All : chains.cpp
• BitC : chains.cpp
• BitC1 : chains.cpp
• BitC2All : chains.cpp
• BitC2DNA : chains.cpp
• BitC2RNA : chains.cpp
• BitC3 : chains.cpp
• BitC4 : chains.cpp
• BitC5 : chains.cpp
• BitCA : chains.cpp
• BitCAAll : chains.cpp
• BitCAGly : chains.cpp
• BitCAll : chains.cpp
• BitCOXT : chains.cpp
• BitCTer : chains.cpp
• BitN : chains.cpp
• BitNAll : chains.cpp
• BitNPro : chains.cpp
• BitNPT : chains.cpp
• BitNTer : chains.cpp
• BitO : chains.cpp
• BitO2 : chains.cpp
• BitO3 : chains.cpp
• BitO3All : chains.cpp
• BitO3Ter : chains.cpp
• BitO4 : chains.cpp
• BitO5 : chains.cpp
• BitO5Ter : chains.cpp
• BitOAll : chains.cpp
• BitOP : chains.cpp
• BitOXT : chains.cpp
• BitP : chains.cpp
• BitPAll : chains.cpp
• BitPTer : chains.cpp
• BL_CONST : parsmart.h
• BL_TYPE : parsmart.h
• BONDEXPRPOOL : parsmart.cpp
• BONDPOOL : parsmart.cpp
• BothEven : rand.cpp
• BS_ALL : parsmart.cpp
• BS_AROM : parsmart.cpp
• BS_DEFAULT : parsmart.cpp
• BS_DOUBLE : parsmart.cpp
• BS_DOWN : parsmart.cpp
• BS_DOWNUNSPEC : parsmart.cpp
• BS_RING : parsmart.cpp

-b- 1391
Open Babel: API Documentation
• BS_SINGLE : parsmart.cpp
• BS_TRIPLE : parsmart.cpp
• BS_UP : parsmart.cpp
• BS_UPUNSPEC : parsmart.cpp
• BT_AROM : parsmart.h
• BT_DOUBLE : parsmart.h
• BT_DOWN : parsmart.h
• BT_DOWNUNSPEC : parsmart.h
• BT_RING : parsmart.h
• BT_SINGLE : parsmart.h
• BT_TRIPLE : parsmart.h
• BT_UP : parsmart.h
• BT_UPUNSPEC : parsmart.h
• BUFF_SIZE : dlhandler_unix.cpp , obconversion.cpp , mol.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f

-b- 1392
Open Babel: API Documentation
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-c-

• CT_MATCH : canon.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

-c- 1393
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-d-

• DEBUG : canon.cpp
• DEFAULTFORMAT : format.h
• DEG_TO_RAD : vector3.h , matrix3x3.h
• DIMENSION : pointgroup.cpp
• DOUBLE : kekulize.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:59 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

-d- 1394
Open Babel: API Documentation

• Classes
• Files

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-e-

• ELEMMAX : parsmart.cpp
• EQ : mol.h
• EQn : mol.h

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

-e- 1395
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-f-

• False : rand.cpp
• FILE_SEP_CHAR : tokenst.h
• FOR_ANGLES_OF_MOL : obiter.h
• FOR_ATOMS_OF_MOL : obiter.h
• FOR_ATOMS_OF_RESIDUE : obiter.h

-f- 1396
Open Babel: API Documentation
• FOR_BFS_OF_MOL : obiter.h
• FOR_BONDS_OF_ATOM : obiter.h
• FOR_BONDS_OF_MOL : obiter.h
• FOR_DFS_OF_MOL : obiter.h
• FOR_NBORS_OF_ATOM : obiter.h
• FOR_PAIRS_OF_MOL : obiter.h
• FOR_RESIDUES_OF_MOL : obiter.h
• FOR_RINGS_OF_MOL : obiter.h
• FOR_TORSIONS_OF_MOL : obiter.h
• FourThirdsPI : obutil.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l

-f- 1397
Open Babel: API Documentation
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-h-

• HiPart : rand.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c

-h- 1398
Open Babel: API Documentation
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-i-

• IF_OBFF_LOGLVL_HIGH : forcefield.h
• IF_OBFF_LOGLVL_LOW : forcefield.h
• IF_OBFF_LOGLVL_MEDIUM : forcefield.h
• IS_ACIDIC : residue.h
• IS_ACYCLIC : residue.h
• IS_ALIPHATIC : residue.h
• IS_AROMATIC : residue.h
• IS_BASIC : residue.h
• IS_BURIED : residue.h
• IS_CHARGED : residue.h
• IS_CYCLIC : residue.h
• IS_HYDROPHOBIC : residue.h
• IS_LARGE : residue.h
• IS_MEDIUM : residue.h
• IS_NEGATIVE : residue.h
• IS_NEUTRAL : residue.h
• IS_POLAR : residue.h
• IS_POSITIVE : residue.h
• IS_SMALL : residue.h
• IS_SURFACE : residue.h
• IsEven : rand.cpp
• IsOdd : rand.cpp
• IsPrime : rand.cpp
• IsUnsatType : mol.h
• IsZero : obutil.cpp

-i- 1399
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-i- 1400
Open Babel: API Documentation

-p-

• PI : obutil.cpp
• PointGroupsCount : pointgroup.cpp
• PORTABLE_SNPRINTF_VERSION_MAJOR : snprintf.h
• PORTABLE_SNPRINTF_VERSION_MINOR : snprintf.h
• PT_ACCEPTOR : patty.h
• PT_ANION : patty.h
• PT_CATION : patty.h
• PT_DONOR : patty.h
• PT_HYDROPHOBIC : patty.h
• PT_METAL : patty.h
• PT_OTHER : patty.h
• PT_POLAR : patty.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c

-p- 1401
Open Babel: API Documentation
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-r-

• RAD_TO_DEG : matrix3x3.h , vector3.h


• READBINARY : format.h
• READONEONLY : format.h
• READXML : format.h
• RESIDMAX : chains.cpp
• RESIDMIN : 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:59 2008 by 1.5.6.

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

-r- 1402
Open Babel: API Documentation
• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-s-

• SETWORD : bitvec.h
• SINGLE : kekulize.cpp
• SQRT_TWO_THIRDS : atom.cpp
• SQUARE : rotor.h , mol.h
• STACKSIZE : chains.cpp
• STARTWORDS : bitvec.h

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

-s- 1403
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-t-

• True : rand.cpp
• TwoThirdsPI : obutil.cpp

-t- 1404
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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p
•r
•s
•t
•v
•w
•z

-t- 1405
Open Babel: API Documentation

-v-

• VC_EXTRALEAN : dlhandler_win32.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

•a
•b
•c
•d
•e
•f
•h
•i
•k
•l
•m
•n
•o
•p

-v- 1406
Open Babel: API Documentation
•r
•s
•t
•v
•w
•z

-w-

• WORDMASK : bitvec.h
• WORDROLL : bitvec.h
• WORDSIZE_OF_BITSIZE : bitvec.h
• WRITEBINARY : format.h
• WRITEONEONLY : format.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

• asnprintf() : snprintf.h

-w- 1407
Open Babel: API Documentation

• asprintf() : snprintf.h
• matchFiles() : dlhandler_unix.cpp
• OBMolToRWMol() : RDKitConv.h
• snprintf() : snprintf.h
• strncasecmp() : obconversion.cpp , data.cpp , atom.cpp
• vasnprintf() : snprintf.h
• vasprintf() : snprintf.h
• vsnprintf() : snprintf.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:59 2008 by 1.5.6.

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

• File List
• File Members

• All
• Functions
• Variables
• Defines

• ChainsResName : chains.cpp

-w- 1408
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:59 2008 by 1.5.6.

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

-w- 1409
Graph Legend
This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */


class Invisible { };

/*! Truncated class, inheritance relation is hidden */


class Truncated : public Invisible { };

/* Class not documented with doxygen comments */


class Undocumented { };

/*! Class that is inherited using public inheritance */


class PublicBase : public Truncated { };

/*! A template class */


template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */


class ProtectedBase { };

/*! Class that is inherited using private inheritance */


class PrivateBase { };

/*! Class that is used by the Inherited class */


class Used { };

/*! Super class that inherits a number of other classes */


class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following
graph:

Graph Legend 1410


Open Babel: API Documentation
The boxes in the above graph have the following meaning:

• A filled gray box represents the struct or class for which the graph is generated.
• A box with a black border denotes a documented struct or class.
• A box with a grey border denotes an undocumented struct or class.
• A box with a red border denotes a documented struct or class forwhich not all
inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified
boundaries.

The arrows have the following meaning:

• A dark blue arrow is used to visualize a public inheritance relation between two classes.
• A dark green arrow is used for protected inheritance.
• A dark red arrow is used for private inheritance.
• A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled
with the variable(s) through which the pointed class or struct is accessible.
• A yellow dashed arrow denotes a relation between a template instance and the template class it was
instantiated from. The arrow is labeled with the template parameters of the instance.

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:59 2008 by 1.5.6.

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

Graph Legend 1411


grid.cpp File Reference
Handle grids of values. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/atom.h>
#include <openbabel/grid.h>

Namespaces
namespace OpenBabel

Functions
ostream & operator<< (ostream &os, const OBFloatGrid &fg)
istream & operator>> (istream &is, OBFloatGrid &fg)

Detailed Description
Handle grids of values.

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

grid.cpp File Reference 1412


grid.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 grid.h - Handle grids of values.
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) 2008 by Marcus D. Hanwell
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_GRID_H
00022 #define OB_GRID_H
00023
00024 #include <openbabel/babelconfig.h>
00025 #include <openbabel/math/vector3.h>
00026
00027 #include <iosfwd>
00028 #include <algorithm>
00029 #include <vector>
00030 #include <string>
00031
00032 namespace OpenBabel
00033 {
00034
00035 // Forward declaration
00036 class OBMol;
00037
00040 class OBAPI OBGrid: public OBBase
00041 {
00042 protected:
00043 double _xmin,_xmax,_ymin,_ymax,_zmin,_zmax;
00044
00045 public:
00046 OBGrid() {}
00047
00051 virtual void Init(OBMol &box);
00052
00054 double GetXmin() const { return(_xmin); }
00056 double GetYmin() const { return(_ymin); }
00058 double GetZmin() const { return(_zmin); }
00060 double GetXmax() const { return(_xmax); }
00062 double GetYmax() const { return(_ymax); }
00064 double GetZmax() const { return(_zmax); }
00065
00067 bool PointIsInBox(double x,double y,double z)

grid.h 1413
Open Babel: API Documentation
00068 {
00069 return (x>=_xmin) && (x<=_xmax) &&
00070 (y>=_ymin) && (y<=_ymax) &&
00071 (z>=_zmin) && (z<=_zmax);
00072 }
00074 bool PointIsInBox(double *c)
00075 {
00076 return (c[0]>=_xmin) && (c[0]<=_xmax) &&
00077 (c[1]>=_ymin) && (c[1]<=_ymax) &&
00078 (c[2]>=_zmin) && (c[2]<=_zmax);
00079 }
00080
00082 bool PointIsInBox(vector3 v)
00083 {
00084 return (v.x() >= _xmin) && (v.x() <=_xmax) &&
00085 (v.y()>=_ymin) && (v.y()<=_ymax) &&
00086 (v.z()>=_zmin) && (v.z()<=_zmax);
00087 }
00088 };
00089
00097 class OBAPI OBFloatGrid: public OBGrid
00098 {
00099 protected:
00100 std::vector<double> _values;
00101 int *_ival;
00102 double _midz,_midx,_midy;
00103 int _ydim,_xdim,_zdim;
00104 double _spacing,_inv_spa;
00105 double _halfSpace;
00106
00107 vector3 _xAxis, _yAxis, _zAxis;
00108
00109 public:
00110
00111 OBFloatGrid() : _ival(NULL), _halfSpace(0.0) {}
00112 ~OBFloatGrid()
00113 {
00114 if (_ival) delete [] _ival;
00115 }
00116
00119 void Init(OBMol &box,double spacing, double pad=0.0);
00120
00122 vector3 GetMin() { return vector3(_xmin, _ymin, _zmin); }
00123
00127 void GetMin(double *a)
00128 {
00129 a[0]=_xmin;
00130 a[1]=_ymin;
00131 a[2]=_zmin;
00132 }
00133
00135 vector3 GetMax() { return vector3(_xmax, _ymax, _zmax); }
00136
00140 void GetMax(double *a)
00141 {
00142 a[0]=_xmax;
00143 a[1]=_ymax;
00144 a[2]=_zmax;
00145 }
00146
00148 double GetSpacing() const { return(_spacing); }

grid.h 1414
Open Babel: API Documentation
00152 void GetSpacing(double &s)
00153 {
00154 s=_spacing;
00155 }
00157 double GetScale() const { return(_inv_spa); }
00159 double GetHalfSpace() const {return(_halfSpace);}
00161 int GetXdim() const { return(_xdim); }
00163 int GetYdim() const { return(_ydim); }
00165 int GetZdim() const { return(_zdim); }
00169 void GetDim(int *a)
00170 {
00171 a[0]=_xdim;
00172 a[1]=_ydim;
00173 a[2]=_zdim;
00174 }
00175
00177 vector3 GetMidpointVector()
00178 {
00179 vector3 v;
00180 v.Set(_midx,_midy,_midz);
00181 return(v);
00182 }
00183
00185 vector3 GetXAxis() const
00186 {
00187 return _xAxis;
00188 }
00189
00191 vector3 GetYAxis() const
00192 {
00193 return _yAxis;
00194 }
00195
00197 vector3 GetZAxis() const
00198 {
00199 return _zAxis;
00200 }
00201
00203 void SetNumberOfPoints(int nx, int ny, int nz);
00204
00206 void SetXAxis(vector3);
00208 void SetYAxis(vector3);
00210 void SetZAxis(vector3);
00211
00216 void SetLimits(const vector3& origin, const vector3& x, const vector3& y,
00217 const vector3& z);
00220 void SetLimits(const double origin[3], const double x[3], const double y[3],
00221 const double z[3]);
00222
00224 std::vector<double> GetDataVector();
00228 void SetVals(const std::vector<double> & vals);
00229
00234 double *GetVals() { return(&_values[0]); }
00235
00237 double GetValue(int i, int j, int k)
00238 {
00239 if (i*_ydim*_zdim + j*_zdim + k > _xdim*_ydim*_zdim)
00240 return 0.0;
00241 else
00242 return _values[i*_ydim*_zdim + j*_zdim + k];
00243 }

grid.h 1415
Open Babel: API Documentation
00244
00247 void SetVals(double *ptr)
00248 {
00249 for (int i = 0; i < _xdim*_ydim*_zdim; ++i)
00250 _values[i] = ptr[i];
00251 }
00252
00254 bool SetValue(int i, int j, int k, double val)
00255 {
00256 if (i*_ydim*_zdim + j*_zdim + k > _xdim*_ydim*_zdim)
00257 return false;
00258
00259 _values[i*_ydim*_zdim + j*_zdim + k] = val;
00260 return true;
00261 }
00262
00264 vector3 Center()
00265 {
00266 return vector3(_midx,_midy,_midz);
00267 }
00268
00269 friend std::ostream& operator<< ( std::ostream&, const OBFloatGrid& ) ;
00270 friend std::istream& operator>> ( std::istream&,OBFloatGrid& ) ;
00271
00273 double Inject(double x,double y,double z);
00274 void IndexToCoords(int idx, double &x, double &y, double &z);
00275 void CoordsToIndex(int*,double*);
00276 int CoordsToIndex(double x, double y, double z);
00278 double Interpolate(double,double,double);
00280 double InterpolateDerivatives(double,double,double,double *derivatives);
00281 };
00282
00283 #ifndef OBPolarGrid
00284 #define OBPolarGrid 0x01 /* polar interactions? */
00285 #endif //OBPolarGrid
00286
00287 #ifndef OBLipoGrid
00288 #define OBLipoGrid 0x02 /* lipophilicity? */
00289 #endif //OBLipoGrid
00290
00294 class OBAPI OBProxGrid: public OBGrid
00295 {
00296 protected:
00297 int _gridtype;
00298 int _nxinc,_nyinc,_nzinc,_maxinc;
00299 double _inc;
00300 std::vector<std::vector<int> > cell;
00301
00302 public:
00303
00304 OBProxGrid(int gridtype=0)
00305 {
00306 _gridtype=gridtype;
00307 }
00308 ~OBProxGrid()
00309 {}
00310 void Setup(OBMol &mol,OBMol &box, double cutoff,double resolution = 0.5);
00311 void Setup(OBMol &mol,OBMol &box, double cutoff,
00312 std::vector<bool> &use,double resolution = 0.5);
00313 std::vector<int> *GetProxVector(double,double,double);
00314 std::vector<int> *GetProxVector(double*);

grid.h 1416
Open Babel: API Documentation
00315
00316 bool LipoGrid()
00317 {
00318 return((_gridtype&OBLipoGrid) ? true : false);
00319 }
00320 bool PolarGrid()
00321 {
00322 return(_gridtype&OBPolarGrid);
00323 }
00324 void SetGridType(int gridtype)
00325 {
00326 _gridtype = gridtype;
00327 }
00328 };
00329
00330 // scoring function used: PLP = Piecewise Linear Potential or ChemScore algorithm
00331 typedef enum { Undefined = -1, PLP, ChemScore } score_t;
00332
00336 class OBAPI OBScoreGrid
00337 {
00338 protected:
00339 score_t gridtype;
00340 bool verbose;
00341
00342 public:
00343
00344 double score;
00345
00346 OBScoreGrid(void) { verbose = false; }
00347 virtual ~OBScoreGrid(void) {}
00348
00349 void SetVerbose(bool v) { verbose = v; }
00350 void SetType(score_t type) { gridtype = type; }
00351 score_t GetType(void) { return gridtype; }
00352
00353 virtual void Clear(void) { }
00354 virtual double Eval(double *) { return -1; }
00355 virtual double Eval(OBMol &mol){return Eval(mol.GetCoordinates());}
00356 virtual void Init(OBMol &, OBMol &, std::string &, double){}
00357 virtual void Setup(OBMol &) {}
00358 virtual void Setup(OBMol &, std::vector<int> &){}
00359 virtual void Setup(std::vector<int> &) {}
00360 virtual void Config(std::string) {}
00361 virtual bool Read(std::string) { return false; }
00362 virtual bool Write(std::string) { return false; }
00363 virtual vector3 Center() { return VZero; }
00364 virtual vector3 CenterMol(OBMol &) { return VZero; }
00365 };
00366
00367 } // end namespace OpenBabel
00368
00369 #endif // OB_GRID_H
00370

grid.h 1417
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

grid.h 1418
grid.h File Reference
Handle grids of values. More...

#include <openbabel/babelconfig.h>
#include <openbabel/math/vector3.h>
#include <iosfwd>
#include <algorithm>
#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 OBGrid
A base grid class. More...
class OBFloatGrid
Handle double precision floating point 3D grids (e.g., charge density around an OBMol). More...
class OBProxGrid
A grid for determining the proximity of a given point to atoms in an OBMol. More...
class OBScoreGrid
A base class for scoring docking interactions between multiple molecules. More...

Defines
#define OBPolarGrid 0x01
#define OBLipoGrid 0x02

grid.h File Reference 1419


Open Babel: API Documentation

Enumerations
enum score_t { Undefined = -1, PLP, ChemScore }

Detailed Description
Handle grids of values.

Define Documentation

#define OBPolarGrid 0x01

Referenced by OBProxGrid::PolarGrid().

#define OBLipoGrid 0x02

Referenced by OBProxGrid::LipoGrid().

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

Enumerations 1420
griddata.cpp File Reference
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential) to molecules. More...

#include <openbabel/babelconfig.h>
#include <openbabel/griddata.h>
#include <openbabel/mol.h>
#include <openbabel/grid.h>
#include <vector>
#include <algorithm>
#include <limits>

Namespaces
namespace OpenBabel

Detailed Description
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential) to 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
• Related Pages
• Namespaces
• Classes
• Files

griddata.cpp File Reference 1421


griddata.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 griddata.h - Store grids of data linked to a molecule (e.g. Gaussian cube)
00003
00004 // Molekel - Molecular Visualization Program
00005 // Copyright (C) 2006, 2007 Swiss National Supercomputing Centre (CSCS)
00006
00007 Some Portions Copyright (C) 2008 by Marcus D. Hanwell
00008
00009 This file is part of the Open Babel project.
00010 For more information, see <http://openbabel.sourceforge.net/>
00011
00012 This program is free software; you can redistribute it and/or modify
00013 it under the terms of the GNU General Public License as published by
00014 the Free Software Foundation version 2 of the License.
00015
00016 This program is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 GNU General Public License for more details.
00020 ***********************************************************************/
00021
00022 #ifndef OB_GRIDDATA_H
00023 #define OB_GRIDDATA_H
00024
00025 #include <openbabel/babelconfig.h>
00026 #include <openbabel/base.h>
00027 #include <openbabel/math/vector3.h>
00028
00029 #include <vector>
00030
00031 namespace OpenBabel {
00032
00033 // Uses private data pointer for ABI compatibility
00034 // http://techbase.kde.org/Policies/Library_Code_Policy#D-Pointers
00035 class GridDataPrivate;
00036
00037 // Class to store values for generic (non axis aligned) grids like Gaussian cube files
00038 // Class introduction in griddata.cpp
00039 class OBAPI OBGridData : public OBGenericData
00040 {
00041 public:
00043 OBGridData();
00044
00046 ~OBGridData();
00047
00049 typedef enum { BOHR, ANGSTROM, OTHER } Unit;
00050
00052
00053
00054
00055
00056 void GetAxes(double x[3], double y[3], double z[3]) const;
00058 vector3 GetXAxis() const;
00060 vector3 GetYAxis() const;
00062 vector3 GetZAxis() const;

griddata.h 1422
Open Babel: API Documentation
00064 void GetAxes(vector3 &v1, vector3 &v2, vector3 &v3) const;
00066 void GetNumberOfPoints(int &nx, int &ny, int &nz) const;
00068 int GetNumberOfPoints() const;
00070 void GetNumberOfSteps(int steps[3]) const;
00072 std::vector< double > GetValues() const;
00074 double GetValue(int i, int j, int k) const;
00076 double GetValue (vector3 pos) const;
00078 Unit GetUnit() const;
00080 double GetMinValue() const;
00082 double GetMaxValue() const;
00084 vector3 GetOriginVector() const;
00088 void GetOriginVector(double o[3]) const;
00090 vector3 GetMaxVector() const;
00092 bool GetUnrestricted() const;
00094 int GetNumSymmetries() const;
00096
00097
00099
00100
00101 void SetNumberOfPoints(int nx, int ny, int nz);
00106 void SetLimits(const vector3 &origin, const vector3 &x, const vector3 &y,
00107 const vector3 &z);
00110 void SetLimits(const double origin[3], const double x[3], const double y[3],
00111 const double z[3]);
00113 bool SetValue(int i, int j, int k, double val);
00115 void SetValues(const std::vector< double >& v);
00117 void SetUnit(Unit u);
00119 void SetUnrestricted(bool u);
00121 void SetNumSymmetries(int s);
00123
00124 private:
00125 GridDataPrivate *const d;
00126
00127 };
00128
00129 } // end namespace
00130
00131 #endif /*OBGRIDDATA_H_*/
00132

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

griddata.h 1423
Open Babel: API Documentation
• Related Pages
• Namespaces
• Classes
• Files

griddata.h 1424
griddata.h File Reference
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential) to molecules. More...

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

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBGridData
Store values for numeric grids such as orbitals or electrostatic potential. More...

Detailed Description
OBGenericData class to connect numeric grids (e.g., orbitals, electrostatic potential) to molecules.

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

griddata.h File Reference 1425


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

Detailed Description 1426


groupcontrib.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 groupcontrib.h - Handle group contribution algorithms.
00003
00004 Copyright (C) 2007 by Tim Vandermeersch
00005 2001-2007 by Stephen Jelfs
00006 2001-2007 by Joerg Kurt Wegner, me@cheminformatics.eu
00007
00008 Original version: JOELib2, http://joelib.sf.net
00009
00010 This file is part of the Open Babel project.
00011 For more information, see <http://openbabel.sourceforge.net/>
00012
00013 This program is free software; you can redistribute it and/or modify
00014 it under the terms of the GNU General Public License as published by
00015 the Free Software Foundation version 2 of the License.
00016
00017 This program is distributed in the hope that it will be useful,
00018 but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 GNU General Public License for more details.
00021 ***********************************************************************/
00022
00023 #ifndef OB_GROUPCONTRIB_H
00024 #define OB_GROUPCONTRIB_H
00025
00026 #include <openbabel/mol.h>
00027 #include <openbabel/parsmart.h>
00028 #include <openbabel/descriptor.h>
00029
00030 // This macro is used in DLL builds. If it has not
00031 // been set in babelconfig.h, define it as nothing.
00032 #ifndef OBDESC
00033 #define OBDESC
00034 #endif
00035
00036 namespace OpenBabel
00037 {
00038
00045 class OBDESC OBGroupContrib : public OBDescriptor
00046 {
00047 public:
00048
00054
00055 OBGroupContrib(const char* ID, const char* filename, const char* descr)
00056 : OBDescriptor(ID, false), _filename(filename), _descr(descr){}
00057
00058 virtual const char* Description();
00059
00060 virtual OBGroupContrib* MakeInstance(const std::vector<std::string>& textlines)
00061 {
00062 return new OBGroupContrib(textlines[1].c_str(),textlines[2].c_str(),textlines[3].c_st
00063 }
00064
00065
00066 virtual double Predict(OBBase* pOb);

groupcontrib.h 1427
Open Babel: API Documentation
00067
00068 private:
00069 bool ParseFile();
00070
00071 const char* _filename;
00072 const char* _descr;
00073 std::vector<std::pair<OBSmartsPattern*, double> > _contribsHeavy;
00074 std::vector<std::pair<OBSmartsPattern*, double> > _contribsHydrogen;
00075 };
00076
00077 /* The classes OBLogp, OBPSA and OBMR have been replaced by instances of
00078 OBGroupContrib with different IDs.
00079 So instead of:
00080 OBLogp logP;
00081 cout << "logP " << logP.Predict(mol) << endl;
00082 use:
00083 OBDescriptor* pDesc = OBDescriptor::FindType("logP")
00084 if(pDesc)
00085 cout << "logP " << pDesc->Predict(&mol) << endl;
00086 */
00087 } // end namespace OpenBabel
00088
00089 #endif // OB_GROUPCONTRIB_H
00090

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

groupcontrib.h 1428
groupcontrib.h File Reference
Handle group contribution algorithms. More...

#include <openbabel/mol.h>
#include <openbabel/parsmart.h>
#include <openbabel/descriptor.h>

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBGroupContrib
Handle group contribution algorithms. More...

Detailed Description
Handle group contribution algorithms.

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

• Alphabetical List

groupcontrib.h File Reference 1429


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

Detailed Description 1430


Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:

• _AtomExpr
• _BondExpr
• AtomSpec
• BondSpec
• CharPtrLess
• DLHandler
• DoubleType
• FastSearch
• FastSearchIndexer
• FilteringInputStreambuf
• FptIndex
• FptIndexHeader
• GasteigerState
• LineEndingExtractor
• LineSearchType
• matrix3x3
♦ transform3d
• OBAngle
• OBAtomAtomIter
• OBAtomBondIter
• OBBase
♦ OBAtom
♦ OBBond
♦ OBGrid
◊ OBFloatGrid
◊ OBProxGrid
♦ OBMol
♦ OBReaction
♦ OBResidue
• OBBitVec
• OBBuilder
• OBChainsParser
• OBChemTsfm
• OBConversion
♦ XMLConversion
• OBElement
• OBError
• OBExternalBond
• OBFFCalculation2
♦ OBFFCalculation3
◊ OBFFCalculation4
• OBFFConstraint
• OBFFConstraints
• OBFFParameter
• OBGastChrg
• OBGenericData

Class Hierarchy 1431


Open Babel: API Documentation
♦ AliasData
♦ OBAngleData
♦ OBAtomClassData
♦ OBChiralData
♦ OBCommentData
♦ OBConformerData
♦ OBExternalBondData
♦ OBGridData
♦ OBMatrixData
♦ OBNasaThermoData
♦ OBPairData
♦ OBPairTemplate
♦ OBRateData
♦ OBRingData
♦ OBRotamerList
♦ OBRotationData
♦ OBSerialNums
♦ OBSetData
♦ OBSymmetryData
♦ OBTorsionData
♦ OBUnitCell
♦ OBVectorData
♦ OBVibrationData
♦ OBVirtualBond
• OBGlobalDataBase
♦ OBAromaticTyper
♦ OBAtomTyper
♦ OBBondTyper
♦ OBElementTable
♦ OBIsotopeTable
♦ OBPhModel
♦ OBResidueData
♦ OBRingTyper
♦ OBRotorRules
♦ OBTypeTable
• OBInternalCoord
• OBLocale
• obLogBuf
• OBMessageHandler
• OBMolAngleIter
• OBMolAtomBFSIter
• OBMolAtomDFSIter
• OBMolAtomIter
• OBMolBondIter
• OBMolPairIter
• OBMolRingIter
• OBMolTorsionIter
• OBPlugin
♦ OBDescriptor
◊ OBGroupContrib
♦ OBFingerprint

Class Hierarchy 1432


Open Babel: API Documentation
♦ OBForceField
♦ OBFormat
◊ OBMoleculeFormat
◊ XMLBaseFormat
⋅ XMLMoleculeFormat
♦ OBOp
◊ OpTransform
• OBPointGroup
• OBRandom
• OBResidueAtomIter
• OBResidueIter
• OBRing
• OBRingSearch
• OBRotor
• OBRotorKeys
• OBRotorList
• OBRotorRule
• OBRTree
• OBScoreGrid
• OBSmartsPattern
• OBSqrtTbl
• OBSSMatch
• OBStopwatch
• OBTorsion
• Pattern
• patty
• quad
• SpaceGroup
• triple
• vector3
♦ transform3d

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

Class Hierarchy 1433


Open Babel: API Documentation

• Classes
• Files

Class Hierarchy 1434


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 1435


Open Babel: API Documentation

• Files

Introduction 1436
internalcoord.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 internalcoord.h - Handle OBInternalCoord class, Cartesian <=> Z-matrix
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_INTERNALCOORD_H
00022 #define OB_INTERNALCOORD_H
00023
00024 #include <openbabel/babelconfig.h>
00025
00026 #ifndef EXTERN
00027 # define EXTERN extern
00028 #endif
00029
00030 namespace OpenBabel
00031 {
00032
00033 class OBAtom;
00034
00060 class OBAPI OBInternalCoord
00061 {
00062 public:
00063 //class members
00064 OBAtom *_a;
00065 OBAtom *_b;
00066 OBAtom *_c;
00067 double _dst;
00068 double _ang;
00069 double _tor;
00070
00072 OBInternalCoord(OBAtom *a= NULL, OBAtom *b= NULL, OBAtom *c= NULL,
00073 double dst = 0.0, double ang = 0.0, double tor = 0.0) :
00074 _a(a), _b(b), _c(c), _dst(dst), _ang(ang), _tor(tor)
00075 {}
00076 };
00077
00078 } // end namespace
00079
00080 #endif // OB_INTERNALCOORD_H
00081

internalcoord.h 1437
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

internalcoord.h 1438
internalcoord.h File Reference
Declaration of OBInternalCoord class, conversion between Cartesian and Z-matrix form. More...

#include <openbabel/babelconfig.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 OBInternalCoord
Used to transform from z-matrix to cartesian coordinates. More...

Detailed Description
Declaration of OBInternalCoord class, conversion between Cartesian and Z-matrix form.

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

internalcoord.h File Reference 1439


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

Open Babel is hosted by:


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

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

Detailed Description 1440


Introduction to Open Babel API
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 and Python) using essentially the same API.

The heart of Open Babel lies in the OBMol, OBAtom, and OBBond classes, which handle operations on
atoms, bonds and molecules. Newcomers should start with looking at the OBMol class, designed to store the
basic information in a molecule and to perceive information about a molecule.

One of the key philosophies in the code is that transformations and automatic perception of properties are
performed in a "lazy" manner. That is, until you call for partial atomic charges, no charges are calculated. This
ensures faster transformations of chemical data -- properties that are not needed for your code will typically
not be calculated. When such data is needed, appropriate routines are called, and a "flag" is set (e.g., via
OBMol::SetFlag or OBAtom::SetFlag etc.) so that the code is only run once.

Arbitrary custom data and text descriptors can be stored in any atom, bond, molecule, or residue using the
OBGenericData or OBPairData classes.

Conversion between various chemical file formats is accomplished through the OBConversion and OBFormat
classes, often through use of the OBMoleculeFormat subclass which is designed for easy read/write access to
one or more OBMol objects. The philosophy of the file format codes is to parse as much chemical information
from a given file as possible (no data left behind) and ideally any perception or transformations will occur
when writing to some other format later.

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

Introduction to Open Babel API 1441


kekulize.cpp File Reference
Alternate algorithm to kekulize a molecule (OBMol::NewPerceiveKekuleBonds()). More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <sstream>

Namespaces
namespace OpenBabel

Defines
#define SINGLE 1
#define DOUBLE 2

Detailed Description
Alternate algorithm to kekulize a molecule (OBMol::NewPerceiveKekuleBonds()).

Define Documentation

#define SINGLE 1

Referenced by OBMol::start_kekulize().

#define DOUBLE 2

Referenced by OBMol::expand_kekulize(), and OBMol::start_kekulize().

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:

kekulize.cpp File Reference 1442


Open Babel: API Documentation

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

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

Define Documentation 1443


kinetics.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 Copyright (C) 2005 by Chris Morley
00003
00004 This file is part of the Open Babel project.
00005 For more information, see <http://openbabel.sourceforge.net/>
00006
00007 This program is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation version 2 of the License.
00010
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014 GNU General Public License for more details.
00015 ***********************************************************************/
00016 #ifndef OB_KINETICS_H
00017 #define OB_KINETICS_H
00018
00019 #include <openbabel/generic.h>
00020
00021 namespace OpenBabel
00022 {
00023
00024 const unsigned RateData = 55555;
00025 const unsigned ThermoData = 55556;
00026
00029
00036 class OBRateData : public OBGenericData
00037 {
00038 protected:
00039 double Rates[3];
00040 double LoRates[3];
00041 double TroeParams[4];
00042 std::map<std::string,double> Efficiencies;
00043 public:
00044 virtual OBGenericData* Clone(OBBase* parent) const{return new OBRateData(*this);}
00045 enum rate_type {A, n, E};
00046 enum reaction_type {ARRHENIUS=55555, LINDERMANN, TROE, SRI, THREEBODY};
00047 reaction_type ReactionType;
00048 OBRateData():OBGenericData("Rate data", RateData)
00049 {
00050 Rates[0]=Rates[1]=Rates[2]=0;
00051 LoRates[0]=LoRates[1]=LoRates[2]=0;
00052 TroeParams[0]=TroeParams[1]=TroeParams[2]=TroeParams[3]=0;
00053 ReactionType = ARRHENIUS;
00054 }
00055
00056 double GetRate(rate_type n) const
00057 {
00058 return Rates[n];
00059 }
00060
00061 void SetRate(rate_type n, const double val)
00062 {
00063 if(n<3)

kinetics.h 1444
Open Babel: API Documentation
00064 Rates[n] = val;
00065 }
00066
00067 double GetLoRate(rate_type n) const
00068 {
00069 return LoRates[n];
00070 }
00071
00072 void SetLoRate(rate_type n, const double val)
00073 {
00074 if(n<3)
00075 LoRates[n] = val;
00076 }
00077
00078 double GetTroeParam(int n) const
00079 {
00080 return TroeParams[n];
00081 }
00082
00083 void SetTroeParams(int n, const double val)
00084 {
00085 if(n<4)
00086 TroeParams[n] = val;
00087 }
00088
00089 void SetEfficiency(std::string id, double Eff)
00090 {
00091 Efficiencies[id] = Eff;
00092 }
00093
00094 double GetEfficiency(std::string id)
00095 {
00096 return Efficiencies[id]; //will be 0 if not found
00097 }
00098
00099 bool GetNextEff(std::string& id, double& Eff)
00100 {
00101 //Supply id empty to begin, then id is the*last* id
00102 std::map<std::string, double>::iterator itr;
00103 if(id.empty())
00104 itr = Efficiencies.begin();
00105 else
00106 {
00107 itr = Efficiencies.find(id);
00108 if(itr!=Efficiencies.end())
00109 ++itr;
00110 }
00111 if(itr==Efficiencies.end())
00112 return false;
00113 id = itr->first;
00114 Eff = itr->second;
00115 return true;
00116 }
00117 };
00118
00119 //******************************************************************************
00122
00134 class OBNasaThermoData : public OBGenericData
00135 {
00136 protected:
00137 double Coeffs[14];

kinetics.h 1445
Open Babel: API Documentation
00138 double LoT, MidT, HiT;
00139 char phase;
00140 public:
00141 OBNasaThermoData(): LoT(300),MidT(1000),HiT(3000),phase('G')
00142 { _type = ThermoData; _attr = "Nasa thermo data";}
00143
00144 virtual OBGenericData* Clone(OBBase* parent) const{return new OBNasaThermoData(*this);}
00145
00146 double GetCoeff(unsigned n) const
00147 {
00148 return Coeffs[n];
00149 }
00150
00151 void SetCoeff(unsigned n, const double val)
00152 {
00153 if(n<14)
00154 Coeffs[n] = val;
00155 }
00156 double GetLoT() const {return LoT;}
00157 double GetMidT() const {return MidT;}
00158 double GetHiT() const {return HiT;}
00159 void SetLoT(double val){LoT=val;}
00160 void SetMidT(double val){MidT=val;}
00161 void SetHiT(double val){HiT=val;}
00162
00163 char GetPhase() const {return phase;}
00164 void SetPhase(char ph){phase=ph;}
00165 };
00166
00167 } //namespace OpenBabel
00168
00169 #endif //OB_KINETICS_H
00170

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

kinetics.h 1446
kinetics.h File Reference
OBRateData and OBNasaThermoData classes. More...

#include <openbabel/generic.h>

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBRateData
Holds rate constant data for OBReaction. More...
class OBNasaThermoData
Thermodynamic data in old style NASA polynomial form for OBMol. More...

Variables
const unsigned RateData = 55555
const unsigned ThermoData = 55556

Detailed Description
OBRateData and OBNasaThermoData 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:53 2008 by 1.5.6.

• Main Page
• Related Pages

kinetics.h File Reference 1447


Open Babel: API Documentation
• Namespaces
• Classes
• Files

Detailed Description 1448


lineend.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 lineend.h - Stream buffer for filtering line endings, converting \r or \r\n -> \n
00003
00004 Copyright (C) 1998 by James Kanze
00005 Copyright (C) 2007 by Chris Morley
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, but
00015 WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017 General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_LINEEND_H
00021 #define OB_LINEEND_H
00022
00023 #include <streambuf>
00024 #include <climits>
00025
00026 #ifndef OBCONV
00027 #define OBCONV
00028 #endif
00029
00030 namespace OpenBabel
00031 {
00032
00058 template< class Extractor >
00059 class FilteringInputStreambuf : public std::streambuf
00060 {
00061 public:
00062 FilteringInputStreambuf(
00063 std::streambuf* source = NULL ,
00064 bool deleteWhenFinished = false
00065 ) ;
00066 virtual ~FilteringInputStreambuf()
00067 {
00068 //sync(); comment out so can be deleted in OBConversion destructor
00069 };
00070 virtual int overflow( int ) {return EOF;};
00071 virtual int underflow() ;
00072 virtual int sync() ;
00073
00074 //Pass the random acess functions to the source rdbuf and synchronize
00075 virtual std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way,
00076 std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
00077 {
00078 std::streampos ret = mySource->pubseekoff(off, way, which);
00079 // sync();
00080 return ret;

lineend.h 1449
Open Babel: API Documentation
00081 };
00082
00083 virtual std::streampos seekpos(std::streampos sp,
00084 std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
00085 {
00086 std::streampos ret = mySource->pubseekpos(sp, which);
00087 // sync();
00088 return ret;
00089 };
00090
00092 std::streambuf* GetSource()const
00093 {
00094 return mySource;
00095 };
00096
00098 void SetSource(std::streambuf* newsource)
00099 {
00100 mySource = newsource;
00101 setg( &myBuffer , &myBuffer , &myBuffer + 1 ) ;
00102 }
00103
00104 // Extractor& extractor() {return myExtractor;};
00105
00106 private:
00107 std::streambuf* mySource ;
00108 Extractor myExtractor ;
00109 char myBuffer ;
00110 bool myDeleteWhenFinished ;
00111 } ;
00112
00113 //*******************************************************
00114 template< class Extractor >
00115 FilteringInputStreambuf< Extractor >::FilteringInputStreambuf(
00116 std::streambuf* source ,
00117 bool deleteWhenFinished)
00118 : mySource(source), myDeleteWhenFinished(deleteWhenFinished)
00119 {
00120 setg( &myBuffer , &myBuffer , &myBuffer ) ;
00121 }
00122
00124 template< class Extractor >
00125 int
00126 FilteringInputStreambuf< Extractor >::underflow()
00127 {
00128 int result( EOF ) ;
00129 if( gptr() < egptr() )
00130 result = *gptr() ;
00131 else if ( mySource != NULL )
00132 {
00133 result = myExtractor( *mySource ) ;
00134 if ( result != EOF )
00135 {
00136 if( result < 0 || result > UCHAR_MAX )
00137 std::cerr << "FilteringInputStreambuf error" << std::endl;
00138 myBuffer = result ;
00139 setg( &myBuffer , &myBuffer , &myBuffer + 1 ) ;
00140 }
00141 }
00142 return result ;
00143 }
00144

lineend.h 1450
Open Babel: API Documentation
00146 template< class Extractor >
00147 int
00148 FilteringInputStreambuf< Extractor >::sync()
00149 {
00150 int result( 0 ) ;
00151 if ( mySource != NULL )
00152 {
00153 if ( gptr() < egptr() )
00154 {
00155 result = mySource->sputbackc( *gptr() ) ;
00156 setg( NULL , NULL , NULL ) ;
00157 }
00158 if ( mySource->pubsync() == EOF )
00159 result = EOF ;
00160 }
00161 return result ;
00162 }
00163
00164 //*********************************************
00167 class OBCONV LineEndingExtractor
00168 {
00169 public:
00170 int operator()( std::streambuf& src )
00171 {
00172 int ch( src.sbumpc() ) ;
00173 switch (ch)
00174 {
00175 case 13: //CR or CRLF
00176 if(src.sgetc() == 10)
00177 src.sbumpc(); //CRLF
00178 //fall through
00179 case 10: //LF
00180 return '\n';
00181 break;
00182 default:
00183 return ch;
00184 }
00185 }
00186 void finalize( std::streambuf& ) {}
00187 };
00188
00189 } //namespace
00190
00191 #endif //OB_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:

lineend.h 1451
Open Babel: API Documentation

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

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

lineend.h 1452
lineend.h File Reference
Translate line endings automatically (UNIX, Classic Mac, DOS). More...

#include <streambuf>
#include <climits>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class FilteringInputStreambuf
Delivers characters from an istream or streambuf from a source while filtering. More...
class LineEndingExtractor
Replaces CRLF (DOS) and CR (Mac OS 9) line endings by LF (POSIX). More...

Detailed Description
Translate line endings automatically (UNIX, Classic Mac, DOS).

lineend.h File Reference 1453


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:53 2008 by 1.5.6.

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

Detailed Description 1454


locale.cpp File Reference
Handle internal numeric locale issues -- parse data in "C". More...

#include <stdlib.h>
#include <string.h>
#include <openbabel/locale.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle internal numeric locale issues -- parse data in "C".

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:53 2008 by 1.5.6.

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

locale.cpp File Reference 1455


locale.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 locale.h - Handle internal numeric locale issues -- parse data in "C"
00003
00004 Copyright (C) 2008 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_LOCALE_H
00020 #define OB_LOCALE_H
00021
00022 #include <locale>
00023 #include <openbabel/babelconfig.h>
00024
00025 #ifndef OBERROR
00026 #define OBERROR
00027 #endif
00028
00029 namespace OpenBabel
00030 {
00031 class OBLocalePrivate;
00032
00033 // more detailed descriptions and documentation in locale.cpp
00035 class OBERROR OBLocale {
00036 public:
00037
00038 OBLocale();
00039 ~OBLocale();
00040
00041 void SetLocale();
00042 void RestoreLocale();
00043
00044 protected:
00045 OBLocalePrivate* d;
00046 };
00047
00048 //global definitions
00050 OBERROR extern OBLocale obLocale;
00051
00052 } // namespace OpenBabel
00053 #endif // OB_LOCALE_H
00054

locale.h 1456
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

locale.h 1457
locale.h File Reference
Handle internal numeric locale issues -- parse data in "C". More...

#include <locale>
#include <openbabel/babelconfig.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 OBLocale
Handle the locale for numeric data parsing. More...

Variables
OBERROR OBLocale obLocale

Detailed Description
Handle internal numeric locale issues -- parse data in "C".

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

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

locale.h File Reference 1458


Open Babel: API Documentation

Open Babel is hosted by:


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

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

Detailed Description 1459


Main Classes
Chemical Storage and Manipulation:

• OBMol - Central molecule class, properties, ...


• OBAtom - Central atom class, properties, coordinates, ...
• OBBond - Bond connection between two OBAtom, properties, bond orders, ...
• OBResidue - Biomolecule residues (amino acids, nucleic acids)
• OBRing - Ring cycle perception, Smallest Set of Smallest Rings (SSSR)

Import / Export:

• OBConversion - Conversion between file formats. Interface for import or export


• OBFormat - Parent class for file format types for any sort of data

Chemical Utilities:

• OBFingerprint - Generating molecular fingerprints for databases and similarity searches


• OBSmartsPattern - Parsing SMARTS chemical search patterns and matching against OBMol objects
• OBForceField - Molecular mechanics force fields for energy evaluation, conformational searching,
coordinate generation, etc.

Utility Classes:

• OBBitVec - Efficient bit vector (e.g., for marking visit to atoms)


• OBMessageHandler - Error and warning handling, filtering, and logging

Arbitrary Data:

• OBBase - General base class of OBAtom, OBMol, OBResidue, etc. for storing generic, arbitrary
custom data
• OBGenericData - General base class for arbitrary data types
• OBPairData - Arbitrary text key/value data for all atoms, bonds, residues, or molecules
• OBUnitCell - Storage and manipulation of crystal structure / reciprocal unit cells

Math Utilities:

• matrix3x3 - Square 3x3 matrices for 3D transformations and rotations


• vector3 - 3D vector class for translations and planes

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

Main Classes 1460


Open Babel: API Documentation
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

Main Classes 1461


matrix3x3.cpp File Reference
Handle 3D rotation matrix. More...

#include <openbabel/babelconfig.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/obutil.h>

Namespaces
namespace OpenBabel

Functions
vector3 operator* (const matrix3x3 &m, const vector3 &v)
matrix3x3 operator* (const matrix3x3 &A, const matrix3x3 &B)
static double SQUARE (double x)
ostream & operator<< (ostream &co, const matrix3x3 &m)

Detailed Description
Handle 3D rotation matrix.

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:53 2008 by 1.5.6.

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

matrix3x3.cpp File Reference 1462


matrix3x3.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 matrix3x3.cpp - Handle 3D Rotation matrix.
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) 2006 by Benoit Jacob
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_MATRIX3x3_H
00022 #define OB_MATRIX3x3_H
00023
00024 #include <ostream>
00025
00026 #include <openbabel/math/vector3.h> // includes rand.h, which includes <math.h>
00027 #include <openbabel/oberror.h>
00028
00029 #ifndef RAD_TO_DEG
00030 #define RAD_TO_DEG (180.0/M_PI)
00031 #endif
00032
00033 #ifndef DEG_TO_RAD
00034 #define DEG_TO_RAD (M_PI/180.0)
00035 #endif
00036
00037 namespace OpenBabel
00038 {
00039 class OBRandom; // class introduction in rand.h
00040
00041 // class introduction in matrix3x3.cpp
00042 class OBAPI matrix3x3
00043 {
00045
00047 double ele[3][3];
00048
00049 public:
00051 matrix3x3(void)
00052 {
00053 // Loops are typically unrolled and/or vectorized
00054 for (unsigned int i = 0; i < 3; ++i)
00055 for (unsigned int j = 0; j < 3; ++j)
00056 ele[i][j] = 0.0;
00057 }
00058

matrix3x3.h 1463
Open Babel: API Documentation
00060 matrix3x3(double s)
00061 {
00062 // Loops are typically unrolled and/or vectorized
00063 for (unsigned int i = 0; i < 3; ++i)
00064 for (unsigned int j = 0; j < 3; ++j)
00065 ele[i][j] = 0.0;
00066
00067 for (unsigned int i = 0; i < 3; ++i)
00068 ele[i][i] = s;
00069 }
00070
00072 matrix3x3(vector3 row1,vector3 row2,vector3 row3)
00073 {
00074 ele[0][0] = row1.x();
00075 ele[0][1] = row1.y();
00076 ele[0][2] = row1.z();
00077 ele[1][0] = row2.x();
00078 ele[1][1] = row2.y();
00079 ele[1][2] = row2.z();
00080 ele[2][0] = row3.x();
00081 ele[2][1] = row3.y();
00082 ele[2][2] = row3.z();
00083 }
00084
00086
00087 matrix3x3(double d[3][3])
00088 {
00089 // Loops are typically unrolled and/or vectorized
00090 for (unsigned int i = 0; i < 3; ++i)
00091 for (unsigned int j = 0; j < 3; ++j)
00092 ele[i][j] = d[i][j];
00093
00094 // We could also potentially use memcpy here
00095 }
00096
00098 ~matrix3x3() {}
00099
00101
00104 void GetArray(double *m)
00105 {
00106 for (unsigned int i = 0; i < 3; ++i)
00107 for (unsigned int j = 0; j < 3; ++j)
00108 m[3*i+j] = ele[i][j];
00109 }
00110
00113 const double & operator() (int row, int column ) const
00114 {
00115 return ele[row][column];
00116 }
00117
00120 double & operator() (int row, int column )
00121 {
00122 return ele[row][column];
00123 }
00124
00126 matrix3x3 inverse(void) const
00127 #ifdef OB_OLD_MATH_CHECKS
00128 throw(OBError)
00129 #endif
00130 ;
00131

matrix3x3.h 1464
Open Babel: API Documentation
00133 matrix3x3 transpose(void) const;
00134
00136 void randomRotation(OBRandom &rnd);
00137
00139 double determinant() const;
00140
00142 bool isSymmetric(void) const;
00143
00145
00159 bool isOrthogonal(void) const
00160 {
00161 return (*this * transpose()).isUnitMatrix();
00162 };
00163
00165 bool isDiagonal(void) const;
00166
00168 bool isUnitMatrix(void) const;
00169
00171
00174 double Get(int row,int column) const
00175 {
00176 #ifdef OB_OLD_MATH_CHECKS
00177 if (row >= 0 && row <= 2 && column >= 0 && column <= 2)
00178 return(ele[row][column]);
00179 else
00180 return 0.0f;
00181 #else
00182 return(ele[row][column]);
00183 #endif
00184 }
00185
00187
00190 void Set(int row,int column, double v)
00191 {
00192 #ifdef OB_OLD_MATH_CHECKS
00193 if (row >= 0 && row <= 2 && column >= 0 && column <= 2)
00194 ele[row][column]= v;
00195 #else
00196 ele[row][column]= v;
00197 #endif
00198 }
00199
00201
00203 void SetColumn(int column, const vector3 &v)
00204 #ifdef OB_OLD_MATH_CHECKS
00205 throw(OBError)
00206 #endif
00207 ;
00208
00210
00212 void SetRow(int row, const vector3 &v)
00213 #ifdef OB_OLD_MATH_CHECKS
00214 throw(OBError)
00215 #endif
00216 ;
00217
00219
00221 vector3 GetColumn(unsigned int col) const
00222 #ifdef OB_OLD_MATH_CHECKS
00223 throw(OBError)
00224 #endif

matrix3x3.h 1465
Open Babel: API Documentation
00225 ;
00226
00228
00230 vector3 GetRow(unsigned int row) const
00231 #ifdef OB_OLD_MATH_CHECKS
00232 throw(OBError)
00233 #endif
00234 ;
00235
00237 matrix3x3 &operator*=(const double &c)
00238 {
00239 for( int i = 0; i < 3; i++ )
00240 for( int j = 0; j < 3; j++ )
00241 ele[i][j] *= c;
00242 return *this;
00243 }
00244
00246 matrix3x3 &operator/=(const double &c)
00247 {
00248 return( (*this) *= ( 1.0 / c ) );
00249 }
00250
00253 void SetupRotMat(double x, double y, double z);
00254
00256 void PlaneReflection(const vector3 &norm);
00257
00260 void RotAboutAxisByAngle(const vector3 &axis, const double angle);
00261
00267 void FillOrth(double alpha, double beta, double gamma,
00268 double a, double b, double c);
00269
00271 matrix3x3 findEigenvectorsIfSymmetric(vector3 &eigenvals) const
00272 #ifdef OB_OLD_MATH_CHECKS
00273 throw(OBError)
00274 #endif
00275 ;
00276
00278 friend OBAPI vector3 operator *(const matrix3x3 &,const vector3 &);
00279
00281 friend OBAPI matrix3x3 operator *(const matrix3x3 &,const matrix3x3 &);
00282
00284 friend OBAPI std::ostream& operator<< ( std::ostream&, const matrix3x3 & ) ;
00285
00287 static void jacobi(unsigned int n, double *a, double *d, double *v);
00288 };
00289
00290 #ifndef SWIG
00291 OBAPI vector3 center_coords(double*,int);
00292 #endif
00293 }
00294
00295 #endif // OB_MATRIX3x3_H
00296

matrix3x3.h 1466
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

matrix3x3.h 1467
matrix3x3.h File Reference
Handle 3D Rotation matrix. More...

#include <ostream>
#include <openbabel/math/vector3.h>
#include <openbabel/oberror.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 matrix3x3
Represents a real 3x3 matrix. More...

Defines
#define RAD_TO_DEG (180.0/M_PI)
#define DEG_TO_RAD (M_PI/180.0)

Functions
vector3 center_coords (double *, int)

Detailed Description
Handle 3D Rotation matrix.

matrix3x3.h File Reference 1468


Open Babel: API Documentation

Define Documentation

#define RAD_TO_DEG (180.0/M_PI)

Referenced by OBRotamerList::Setup(), OpenBabel::vectorAngle(), OBForceField::VectorAngle(),


OBForceField::VectorAngleDerivative(), OBForceField::VectorOOP(),
OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

#define DEG_TO_RAD (M_PI/180.0)

Referenced by OBForceField::DistanceGeometry(), matrix3x3::FillOrth(),


OBFFConstraints::GetConstraintEnergy(), OBUnitCell::GetFractionalMatrix(),
OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OpenBabel::InternalToCartesian(),
OBRotorRules::ParseLine(), OBRotor::RemoveSymTorsionValues(), OBRotorList::RemoveSymVals(),
matrix3x3::RotAboutAxisByAngle(), OpenBabel::SetRotorToAngle(), matrix3x3::SetupRotMat(), and
OBForceField::VectorTorsionDerivative().

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:53 2008 by 1.5.6.

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

Define Documentation 1469


matrix.cpp File Reference
Operations on arbitrary-sized matrix. More...

#include <openbabel/babelconfig.h>
#include <openbabel/matrix.h>
#include <cstdio>

Namespaces
namespace OpenBabel

Functions
void print_matrix (std::vector< std::vector< double > > &m)
void print_matrix_f (double *m, int rows, int cols)
void print_matrix_ff (double **m, int rows, int cols)
bool mult_matrix (std::vector< std::vector< double > > &c, std::vector< std::vector< double > > &a,
std::vector< std::vector< double > > &b)
bool mult_matrix_f (double *c, double *a, double *b, int rows, int cols)
bool mult_matrix_ff (double **c, double **a, double **b, int rows, int cols)
bool invert_matrix (std::vector< std::vector< double > > &m, double &det)
bool invert_matrix_f (double *m, double &det, int rows, int cols)
bool invert_matrix_ff (double **m, double &det, int rows, int cols)
bool convert_matrix_f (std::vector< std::vector< double > > &src, double *dst)
bool convert_matrix_ff (std::vector< std::vector< double > > &src, double **dst)
bool convert_matrix_f (double *src, std::vector< std::vector< double > > &dst, int rows, int cols)
bool convert_matrix_ff (double **src, std::vector< std::vector< double > > &dst, int rows, int cols)
bool convert_matrix_f_ff (double *src, double **dst, int rows, int cols)
bool convert_matrix_ff_f (double **src, double *dst, int rows, int cols)

Detailed Description
Operations on arbitrary-sized matrix.

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

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

matrix.cpp File Reference 1470


Open Babel: API Documentation

Open Babel is hosted by:


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

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

Detailed Description 1471


matrix.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 matrix.h - Operations on arbitrary-sized matrix.
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_MATRIX_H
00021 #define OB_MATRIX_H
00022 #include <openbabel/babelconfig.h>
00023 #include <vector>
00024 #include <math.h>
00025
00026 namespace OpenBabel
00027 {
00028
00029 /*
00030 * vector<vector<double> > m : m[row][col] gives appropriate row/col entry
00031 * double **m : m[row][col] gives appropriate row/col entry
00032 * double *m : m[(row * numCols) + col] gives appropriate row/col entry
00033 */
00034
00035 void print_matrix(std::vector<std::vector<double> > &m);
00036 void print_matrix_f (double *m, int rows, int cols);
00037 void print_matrix_ff(double **m, int rows, int cols);
00038
00039 bool mult_matrix(std::vector<std::vector<double> > &c, std::vector<std::vector<double> >
00040 bool mult_matrix_f (double *c, double *a, double *b, int rows, int cols);
00041 bool mult_matrix_ff(double **c, double **a, double **b, int rows, int cols);
00042
00043 bool invert_matrix(std::vector<std::vector<double> > &m, double &det);
00044 bool invert_matrix_f (double *m, double &det, int rows, int cols);
00045 bool invert_matrix_ff(double **m, double &det, int rows, int cols);
00046
00047 bool convert_matrix_f (std::vector<std::vector<double> > &src, double *dst);
00048 bool convert_matrix_ff(std::vector<std::vector<double> > &src, double **dst);
00049 bool convert_matrix_f (double *src, std::vector<std::vector<double> > &dst, int rows, in
00050 bool convert_matrix_ff(double **src, std::vector<std::vector<double> > &dst, int rows, in
00051 bool convert_matrix_ff_f(double **src, double *dst, int rows, int cols);
00052 bool convert_matrix_f_ff(double *src, double **dst, int rows, int cols);
00053
00054 }
00055

matrix.h 1472
Open Babel: API Documentation
00056 #endif // OB_MATRIX_H
00057

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

matrix.h 1473
matrix.h File Reference
Operations on arbitrary-sized matrix. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <math.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 print_matrix (std::vector< std::vector< double > > &m)
void print_matrix_f (double *m, int rows, int cols)
void print_matrix_ff (double **m, int rows, int cols)
bool mult_matrix (std::vector< std::vector< double > > &c, std::vector< std::vector< double > > &a,
std::vector< std::vector< double > > &b)
bool mult_matrix_f (double *c, double *a, double *b, int rows, int cols)
bool mult_matrix_ff (double **c, double **a, double **b, int rows, int cols)
bool invert_matrix (std::vector< std::vector< double > > &m, double &det)
bool invert_matrix_f (double *m, double &det, int rows, int cols)
bool invert_matrix_ff (double **m, double &det, int rows, int cols)
bool convert_matrix_f (std::vector< std::vector< double > > &src, double *dst)
bool convert_matrix_ff (std::vector< std::vector< double > > &src, double **dst)
bool convert_matrix_f (double *src, std::vector< std::vector< double > > &dst, int rows, int cols)
bool convert_matrix_ff (double **src, std::vector< std::vector< double > > &dst, int rows, int cols)
bool convert_matrix_ff_f (double **src, double *dst, int rows, int cols)
bool convert_matrix_f_ff (double *src, double **dst, int rows, int cols)

matrix.h File Reference 1474


Open Babel: API Documentation

Detailed Description
Operations on arbitrary-sized matrix.

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:53 2008 by 1.5.6.

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

Detailed Description 1475


mol.cpp File Reference
Handle molecules. Implementation of OBMol. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/rotamer.h>
#include <openbabel/phmodel.h>
#include <openbabel/bondtyper.h>
#include <openbabel/builder.h>
#include <openbabel/math/matrix3x3.h>
#include <sstream>
#include <set>

Namespaces
namespace OpenBabel

Defines
#define OBAtomIncrement 100
#define OBBondIncrement 100
#define OBAtomIncrement 100
#define OBBondIncrement 100

Functions
bool SortVVInt (const vector< int > &a, const vector< int > &b)
bool SortAtomZ (const pair< OBAtom *, double > &a, const pair< OBAtom *, double > &b)
static bool OBComparePairSecond (const pair< OBAtom *, unsigned int > &a, const pair< OBAtom *,
unsigned int > &b)
static bool OBComparePairFirst (const pair< OBAtom *, unsigned int > &a, const pair< OBAtom *,
unsigned int > &b)
static void ClassCount (vector< pair< OBAtom *, unsigned int > > &vp, unsigned int &count)
static void CreateNewClassVector (vector< pair< OBAtom *, unsigned int > > &vp1, vector< pair<
OBAtom *, unsigned int > > &vp2)
static int ValenceSum (OBAtom *atom)
static bool KekulePropagate (OBAtom *atom, vector< int > &visit, vector< int > &ival, int depth)
int GetCurrentValence (OBAtom *atom)
bool ExpandKekule (OBMol &mol, vector< OBAtom * > &va, vector< OBAtom * >::iterator i,
vector< int > &maxv, bool secondpass)
void CorrectBadResonanceForm (OBMol &mol)
bool WriteTitles (ostream &ofs, OBMol &mol)

mol.cpp File Reference 1476


Open Babel: API Documentation

Variables
bool SwabInt = (STPTR[0]!=0)

Detailed Description
Handle molecules. Implementation of OBMol.

Define Documentation

#define OBAtomIncrement 100

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

#define OBBondIncrement 100

Referenced by OBMol::AddBond(), and OBMol::NewBond().

#define OBAtomIncrement 100

#define OBBondIncrement 100

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:53 2008 by 1.5.6.

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

Variables 1477
mol.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 mol.h - Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue.
00003 (the main header for Open Babel)
00004
00005 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00006 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00007 Some portions Copyright (C) 2003 by Michael Banck
00008
00009 This file is part of the Open Babel project.
00010 For more information, see <http://openbabel.sourceforge.net/>
00011
00012 This program is free software; you can redistribute it and/or modify
00013 it under the terms of the GNU General Public License as published by
00014 the Free Software Foundation version 2 of the License.
00015
00016 This program is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 GNU General Public License for more details.
00020 ***********************************************************************/
00021
00022 #ifndef OB_MOL_H
00023 #define OB_MOL_H
00024
00025 #include <openbabel/babelconfig.h>
00026
00027 #ifndef EXTERN
00028 # define EXTERN extern
00029 #endif
00030
00031 #include <math.h>
00032 #include <float.h>
00033
00034 #include <vector>
00035 #include <string>
00036 #include <map>
00037
00038 // Currently includes many headers for 2.x backwards compatibility
00039 // \deprecated -- this will be cleaned up in 3.0 efforts
00040 // to improve compile time significantly.
00041 // Only include necessary headers and class declaration stubs.
00042 #include <openbabel/atom.h>
00043 #include <openbabel/bond.h>
00044 #include <openbabel/base.h>
00045 #include <openbabel/data.h>
00046 #include <openbabel/chains.h>
00047 #include <openbabel/math/vector3.h>
00048 #include <openbabel/bitvec.h>
00049 #include <openbabel/residue.h>
00050 #include <openbabel/ring.h>
00051 #include <openbabel/generic.h>
00052 #include <openbabel/typer.h>
00053 #include <openbabel/oberror.h>
00054 #include <openbabel/obiter.h>
00055 #include <openbabel/internalcoord.h>

mol.h 1478
Open Babel: API Documentation
00056
00057 namespace OpenBabel
00058 {
00059
00060 class OBAtom;
00061 class OBBond;
00062 class OBInternalCoord;
00063
00064 // Class OBMol
00065 //MOL Property Macros (flags) -- 32+ bits
00067 #define OB_SSSR_MOL (1<<1)
00069 #define OB_RINGFLAGS_MOL (1<<2)
00071 #define OB_AROMATIC_MOL (1<<3)
00073 #define OB_ATOMTYPES_MOL (1<<4)
00075 #define OB_CHIRALITY_MOL (1<<5)
00077 #define OB_PCHARGE_MOL (1<<6)
00079 #define OB_HYBRID_MOL (1<<8)
00081 #define OB_IMPVAL_MOL (1<<9)
00083 #define OB_KEKULE_MOL (1<<10)
00085 #define OB_CLOSURE_MOL (1<<11)
00087 #define OB_H_ADDED_MOL (1<<12)
00089 #define OB_PH_CORRECTED_MOL (1<<13)
00091 #define OB_AROM_CORRECTED_MOL (1<<14)
00093 #define OB_CHAINS_MOL (1<<15)
00095 #define OB_TCHARGE_MOL (1<<16)
00097 #define OB_TSPIN_MOL (1<<17)
00099 #define OB_RINGTYPES_MOL (1<<18)
00100 // flags 18-32 unspecified
00101 #define OB_CURRENT_CONFORMER -1
00102
00103 // class introduction in mol.cpp
00104 class OBAPI OBMol: public OBBase
00105 {
00106 protected:
00107 int _flags;
00108 bool _autoPartialCharge;
00109 bool _autoFormalCharge;
00110 std::string _title;
00111 std::vector<OBAtom*> _vatom;
00112 std::vector<OBBond*> _vbond;
00113 unsigned short int _dimension;
00114 int _totalCharge;
00115 unsigned int _totalSpin;
00116 double *_c;
00117 std::vector<double*> _vconf;
00118 double _energy;
00119 unsigned int _natoms;
00120 unsigned int _nbonds;
00121 std::vector<OBResidue*> _residue;
00122 std::vector<OBInternalCoord*> _internals;
00123 unsigned short int _mod;
00124
00125 bool HasFlag(int flag) { return((_flags & flag) ? true : false); }
00126 void SetFlag(int flag) { _flags |= flag; }
00127
00129
00130 void start_kekulize(std::vector <OBAtom*> &cycle, std::vector<int> &electron);
00131 int expand_kekulize(OBAtom *atom1, OBAtom *atom2, std::vector<int> &currentState, std
00132 int getorden(OBAtom *atom);
00133 bool expandcycle(OBAtom *atom, OBBitVec &avisit, OBAtom *first = NULL, int depth = 0)
00135

mol.h 1479
Open Babel: API Documentation
00136 public:
00137
00139
00140
00141 OBMol();
00143 OBMol(const OBMol &);
00145 virtual ~OBMol();
00147 OBMol &operator=(const OBMol &mol);
00149 OBMol &operator+=(const OBMol &mol);
00150
00153 void ReserveAtoms(int natoms)
00154 {
00155 if (natoms > 0 && _mod)
00156 _vatom.reserve(natoms);
00157 }
00158
00161 virtual OBAtom *CreateAtom(void);
00164 virtual OBBond *CreateBond(void);
00167 virtual OBResidue *CreateResidue(void);
00170 virtual void DestroyAtom(OBAtom*);
00173 virtual void DestroyBond(OBBond*);
00176 virtual void DestroyResidue(OBResidue*);
00177
00180 bool AddAtom(OBAtom&);
00183 bool InsertAtom(OBAtom &);
00191 bool AddBond(int beginIdx, int endIdx, int order,
00192 int flags=0,int insertpos=-1);
00195 bool AddBond(OBBond&);
00198 bool AddResidue(OBResidue&);
00199
00202 OBAtom *NewAtom();
00205 OBBond *NewBond();
00207 OBResidue *NewResidue();
00212 bool DeleteAtom(OBAtom*, bool destroyAtom = true);
00215 bool DeleteBond(OBBond*, bool destroyBond = true);
00218 bool DeleteResidue(OBResidue*, bool destroyResidue = true);
00220
00222
00223
00224
00225
00226 virtual void BeginModify(void);
00230 virtual void EndModify(bool nukePerceivedData=true);
00232 int GetMod() { return(_mod); }
00235 void IncrementMod() { _mod++; }
00238 void DecrementMod() { _mod--; }
00240
00242
00243
00244 int GetFlags() { return(_flags); }
00247 const char *GetTitle(bool replaceNewlines = true) const;
00249 unsigned int NumAtoms() const { return(_natoms); }
00251 unsigned int NumBonds() const { return(_nbonds); }
00253 unsigned int NumHvyAtoms();
00255 unsigned int NumResidues() const { return(_residue.size()); }
00257 unsigned int NumRotors();
00258
00261 OBAtom *GetAtom(int idx) const;
00264 OBAtom *GetFirstAtom() const;
00267 OBBond *GetBond(int idx) const;
00270 OBBond *GetBond(int a, int b) const;

mol.h 1480
Open Babel: API Documentation
00271 // The safer version of the above method
00273 OBBond *GetBond(OBAtom* bgn, OBAtom* end) const;
00276 OBResidue *GetResidue(int idx) const;
00277 std::vector<OBInternalCoord*> GetInternalCoord();
00282 double GetTorsion(int,int,int,int);
00287 double GetTorsion(OBAtom* a,OBAtom* b,OBAtom* c,OBAtom* d);
00290 double GetAngle(OBAtom* a, OBAtom* b, OBAtom* c);
00292 std::string GetFormula();
00294 std::string GetSpacedFormula(int ones=0, const char* sp=" ", bool implicitH = true);
00296 double GetEnergy() const { return _energy; }
00298 double GetMolWt(bool implicitH = true);
00300 double GetExactMass(bool implicitH = true);
00302 int GetTotalCharge();
00304 unsigned int GetTotalSpinMultiplicity();
00306 unsigned short int GetDimension() const { return _dimension; }
00308 double *GetCoordinates() { return(_c); }
00310 std::vector<OBRing*> &GetSSSR();
00312 bool AutomaticFormalCharge() { return(_autoFormalCharge); }
00314 bool AutomaticPartialCharge() { return(_autoPartialCharge); }
00316
00317
00319
00320
00321 void SetTitle(const char *title);
00323 void SetTitle(std::string &title);
00325 void SetFormula(std::string molFormula);
00327 void SetEnergy(double energy) { _energy = energy; }
00329 void SetDimension(unsigned short int d) { _dimension = d; }
00331 void SetTotalCharge(int charge);
00334 void SetTotalSpinMultiplicity(unsigned int spinMultiplicity);
00337 void SetInternalCoord(std::vector<OBInternalCoord*> int_coord)
00338 { _internals = int_coord; }
00340 void SetAutomaticFormalCharge(bool val)
00341 { _autoFormalCharge=val; }
00343 void SetAutomaticPartialCharge(bool val)
00344 { _autoPartialCharge=val; }
00345
00347 void SetAromaticPerceived() { SetFlag(OB_AROMATIC_MOL); }
00349 void SetSSSRPerceived() { SetFlag(OB_SSSR_MOL); }
00351 void SetRingAtomsAndBondsPerceived(){SetFlag(OB_RINGFLAGS_MOL);}
00353 void SetAtomTypesPerceived() { SetFlag(OB_ATOMTYPES_MOL); }
00355 void SetRingTypesPerceived() { SetFlag(OB_RINGTYPES_MOL); }
00357 void SetChainsPerceived() { SetFlag(OB_CHAINS_MOL); }
00359 void SetChiralityPerceived() { SetFlag(OB_CHIRALITY_MOL); }
00361 void SetPartialChargesPerceived(){ SetFlag(OB_PCHARGE_MOL); }
00363 void SetHybridizationPerceived() { SetFlag(OB_HYBRID_MOL); }
00365 void SetImplicitValencePerceived(){ SetFlag(OB_IMPVAL_MOL); }
00367 void SetKekulePerceived() { SetFlag(OB_KEKULE_MOL); }
00369 void SetClosureBondsPerceived(){ SetFlag(OB_CLOSURE_MOL); }
00371 void SetHydrogensAdded() { SetFlag(OB_H_ADDED_MOL); }
00372 void SetCorrectedForPH() { SetFlag(OB_PH_CORRECTED_MOL);}
00373 void SetAromaticCorrected() { SetFlag(OB_AROM_CORRECTED_MOL);}
00374 void SetSpinMultiplicityAssigned(){ SetFlag(OB_TSPIN_MOL); }
00375 void SetFlags(int flags) { _flags = flags; }
00376
00377 void UnsetAromaticPerceived() { _flags &= (~(OB_AROMATIC_MOL)); }
00378 void UnsetSSSRPerceived() { _flags &= (~(OB_SSSR_MOL)); }
00379 void UnsetRingTypesPerceived() { _flags &= (~(OB_RINGTYPES_MOL)); }
00380 void UnsetPartialChargesPerceived(){ _flags &= (~(OB_PCHARGE_MOL));}
00381 void UnsetImplicitValencePerceived(){_flags &= (~(OB_IMPVAL_MOL)); }
00382 void UnsetHydrogensAdded() { UnsetFlag(OB_H_ADDED_MOL); }

mol.h 1481
Open Babel: API Documentation
00383 void UnsetFlag(int flag) { _flags &= (~(flag)); }
00385
00387
00388 // Description in transform.cpp (command-line transformations to this molecule)
00389 virtual OBBase* DoTransformations(const std::map<std::string,std::string>* pOption
00390 // Ditto (documentation on transformation options)
00391 static const char* ClassDescription();
00393 bool Clear();
00395 void RenumberAtoms(std::vector<OBAtom*>&);
00398 void SetCoordinates(double *c);
00400 void ToInertialFrame(int conf, double *rmat);
00402 void ToInertialFrame();
00404 void Translate(const vector3 &v);
00406 void Translate(const vector3 &v, int conf);
00408 void Rotate(const double u[3][3]);
00410 void Rotate(const double m[9]);
00412 void Rotate(const double m[9],int nconf);
00414 void Center();
00416
00417 bool Kekulize();
00418 bool PerceiveKekuleBonds();
00419
00420 void NewPerceiveKekuleBonds();
00421
00424 bool DeleteHydrogens();
00427 bool DeleteHydrogens(OBAtom*);
00430 bool DeleteNonPolarHydrogens();
00433 bool DeleteHydrogen(OBAtom*);
00440 bool AddHydrogens(bool polaronly=false,bool correctForPH=false, double pH=7.4);
00442 bool AddHydrogens(OBAtom*);
00444 bool AddPolarHydrogens();
00445
00447 bool StripSalts(int threshold);
00449 std::vector<OBMol> Separate(int StartIndex=1);
00451 bool GetNextFragment( OpenBabel::OBMolAtomDFSIter& iter, OBMol& newMol );
00453 bool ConvertDativeBonds();
00454
00456 bool CorrectForPH(double pH=7.4);
00457 // docs in mol.cpp
00458 bool AssignSpinMultiplicity(bool NoImplicitH=false);
00461 vector3 Center(int nconf);
00467 void SetTorsion(OBAtom*,OBAtom*,OBAtom*,OBAtom*,double ang);
00469
00471
00472
00473 void FindSSSR();
00475 void FindRingAtomsAndBonds();
00477 void FindChiralCenters();
00478 // documented in mol.cpp -- locates all atom indexes which can reach 'end'
00479 void FindChildren(std::vector<int> & children,int bgnIdx,int endIdx);
00480 // documented in mol.cpp -- locates all atoms which can reach 'end'
00481 void FindChildren(std::vector<OBAtom*>& children,OBAtom* bgn,OBAtom* end);
00486 void FindLargestFragment(OBBitVec &frag);
00489 void ContigFragList(std::vector<std::vector<int> >&);
00491 void Align(OBAtom*,OBAtom*,vector3&,vector3&);
00493 void ConnectTheDots();
00495 void PerceiveBondOrders();
00497 void FindAngles();
00499 void FindTorsions();
00500 // documented in mol.cpp: graph-theoretical distance for each atom
00501 bool GetGTDVector(std::vector<int> &);

mol.h 1482
Open Babel: API Documentation
00502 // documented in mol.cpp: graph-invariant index for each atom
00503 void GetGIVector(std::vector<unsigned int> &);
00504 // documented in mol.cpp: calculate symmetry-unique identifiers
00505 void GetGIDVector(std::vector<unsigned int> &);
00507
00509
00510
00511 bool Has2D();
00513 bool Has3D();
00515 bool HasNonZeroCoords();
00517 bool HasAromaticPerceived() { return(HasFlag(OB_AROMATIC_MOL)); }
00519 bool HasSSSRPerceived() { return(HasFlag(OB_SSSR_MOL)); }
00521 bool HasRingAtomsAndBondsPerceived(){return(HasFlag(OB_RINGFLAGS_MOL));}
00523 bool HasAtomTypesPerceived() { return(HasFlag(OB_ATOMTYPES_MOL));}
00525 bool HasRingTypesPerceived() { return(HasFlag(OB_RINGTYPES_MOL));}
00527 bool HasChiralityPerceived() { return(HasFlag(OB_CHIRALITY_MOL));}
00529 bool HasPartialChargesPerceived() { return(HasFlag(OB_PCHARGE_MOL));}
00531 bool HasHybridizationPerceived() { return(HasFlag(OB_HYBRID_MOL)); }
00533 bool HasImplicitValencePerceived() { return(HasFlag(OB_IMPVAL_MOL));}
00535 bool HasKekulePerceived() { return(HasFlag(OB_KEKULE_MOL)); }
00537 bool HasClosureBondsPerceived() { return(HasFlag(OB_CLOSURE_MOL)); }
00539 bool HasChainsPerceived() { return(HasFlag(OB_CHAINS_MOL)); }
00541 bool HasHydrogensAdded() { return(HasFlag(OB_H_ADDED_MOL)); }
00543 bool HasAromaticCorrected() { return(HasFlag(OB_AROM_CORRECTED_MOL));}
00545 bool IsCorrectedForPH() { return(HasFlag(OB_PH_CORRECTED_MOL)); }
00547 bool HasSpinMultiplicityAssigned() { return(HasFlag(OB_TSPIN_MOL)); }
00549 bool IsChiral();
00551 bool Empty() { return(_natoms == 0); }
00553
00555
00556
00557 int NumConformers() { return((_vconf.empty())?0:_vconf.size()); }
00559 void SetConformers(std::vector<double*> &v);
00561 void AddConformer(double *f) { _vconf.push_back(f); }
00564 void SetConformer(int i);
00567 void CopyConformer(double* c,int nconf);
00569 void DeleteConformer(int nconf);
00571 double *GetConformer(int i) { return(_vconf[i]); }
00573 void SetEnergies(std::vector<double> &energies);
00575 std::vector<double> GetEnergies();
00578 double GetEnergy(int ci);
00581 double *BeginConformer(std::vector<double*>::iterator&i)
00582 { i = _vconf.begin();
00583 return((i == _vconf.end()) ? NULL:*i); }
00586 double *NextConformer(std::vector<double*>::iterator&i)
00587 { ++i;
00588 return((i == _vconf.end()) ? NULL:*i); }
00590 std::vector<double*> &GetConformers() { return(_vconf); }
00592
00594
00595
00596 OBAtomIterator BeginAtoms() { return _vatom.begin(); }
00598 OBAtomIterator EndAtoms() { return _vatom.begin() + NumAtoms() ; }
00600 OBBondIterator BeginBonds() { return _vbond.begin(); }
00602 OBBondIterator EndBonds() { return _vbond.begin() + NumBonds() ; }
00604 OBResidueIterator BeginResidues() { return _residue.begin(); }
00606 OBResidueIterator EndResidues() { return _residue.end(); }
00607
00610 OBAtom *BeginAtom(OBAtomIterator &i);
00613 OBAtom *NextAtom(OBAtomIterator &i);
00616 OBBond *BeginBond(OBBondIterator &i);

mol.h 1483
Open Babel: API Documentation
00619 OBBond *NextBond(OBBondIterator &i);
00622 OBResidue *BeginResidue(OBResidueIterator &i)
00623 {
00624 i = _residue.begin();
00625 return((i == _residue.end()) ? NULL:*i);
00626 }
00629 OBResidue *NextResidue(OBResidueIterator &i)
00630 {
00631 ++i;
00632 return((i == _residue.end()) ? NULL:*i);
00633 }
00637 OBInternalCoord *BeginInternalCoord(std::vector<OBInternalCoord*>::iterator &i)
00638 {
00639 i = _internals.begin();
00640 return((i == _internals.end()) ? NULL:*i);
00641 }
00645 OBInternalCoord *NextInternalCoord(std::vector<OBInternalCoord*>::iterator &i)
00646 {
00647 ++i;
00648 return((i == _internals.end()) ? NULL:*i);
00649 }
00651
00652 };
00653
00654 // Utility function prototypes
00655 //tokenize and Trim declarations moved to base.h
00656 // Deprecated -- use OBMessageHandler class instead (docs in obutil.cpp)
00657 OBAPI void ThrowError(char *str);
00658 // Deprecated -- use OBMessageHandler class instead (docs in obutil.cpp)
00659 OBAPI void ThrowError(std::string &str);
00661 OBAPI void CartesianToInternal(std::vector<OBInternalCoord*>&,OBMol&);
00663 OBAPI void InternalToCartesian(std::vector<OBInternalCoord*>&,OBMol&);
00664 // Replace the last extension in str with a new one (docs in obutil.cpp)
00665 OBAPI std::string NewExtension(std::string&,char*);
00666
00667 //global definitions
00669 EXTERN OBElementTable etab;
00672 EXTERN OBTypeTable ttab;
00674 EXTERN OBIsotopeTable isotab;
00676 EXTERN OBAromaticTyper aromtyper;
00679 EXTERN OBAtomTyper atomtyper;
00681 EXTERN OBChainsParser chainsparser;
00683 OBERROR extern OBMessageHandler obErrorLog;
00685 EXTERN OBResidueData resdat;
00686
00687 //Utility Macros
00688
00689 #ifndef BUFF_SIZE
00690 #define BUFF_SIZE 32768
00691 #endif
00692
00693 #ifndef EQ
00694 #define EQ(a,b) (!strcmp((a), (b)))
00695 #endif
00696
00697 #ifndef EQn
00698 #define EQn(a,b,n) (!strncmp((a), (b), (n)))
00699 #endif
00700
00701 #ifndef SQUARE
00702 #define SQUARE(x) ((x)*(x))

mol.h 1484
Open Babel: API Documentation
00703 #endif
00704
00705 #ifndef IsUnsatType
00706 #define IsUnsatType(x) (EQ(x,"Car") || EQ(x,"C2") || EQ(x,"Sox") || EQ(x,"Sac") || EQ(x,
00707 #endif
00708
00709 #ifndef __KCC
00710 extern "C"
00711 {
00712 OBAPI void get_rmat(double*,double*,double*,int);
00713 OBAPI void ob_make_rmat(double mat[3][3],double rmat[9]);
00714 OBAPI void qtrfit (double *r,double *f,int size,double u[3][3]);
00715 OBAPI double superimpose(double*,double*,int);
00716 }
00717 #else
00718 OBAPI void get_rmat(double*,double*,double*,int);
00719 OBAPI void ob_make_rmat(double mat[3][3],double rmat[9]);
00720 OBAPI void qtrfit (double *r,double *f,int size,double u[3][3]);
00721 OBAPI double superimpose(double*,double*,int);
00722 #endif // __KCC
00723
00724 // extern OBMol* (*CreateMolecule) (void);
00725
00726 } // end namespace OpenBabel
00727
00728 #endif // OB_MOL_H
00729

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

mol.h 1485
mol.h File Reference
Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open
Babel). More...

#include <openbabel/babelconfig.h>
#include <math.h>
#include <float.h>
#include <vector>
#include <string>
#include <map>
#include <openbabel/atom.h>
#include <openbabel/bond.h>
#include <openbabel/base.h>
#include <openbabel/data.h>
#include <openbabel/chains.h>
#include <openbabel/math/vector3.h>
#include <openbabel/bitvec.h>
#include <openbabel/residue.h>
#include <openbabel/ring.h>
#include <openbabel/generic.h>
#include <openbabel/typer.h>
#include <openbabel/oberror.h>
#include <openbabel/obiter.h>
#include <openbabel/internalcoord.h>

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

mol.h File Reference 1486


Open Babel: API Documentation

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBMol
Molecule Class. More...

Defines
#define OB_SSSR_MOL (1<<1)
#define OB_RINGFLAGS_MOL (1<<2)
#define OB_AROMATIC_MOL (1<<3)
#define OB_ATOMTYPES_MOL (1<<4)
#define OB_CHIRALITY_MOL (1<<5)
#define OB_PCHARGE_MOL (1<<6)
#define OB_HYBRID_MOL (1<<8)
#define OB_IMPVAL_MOL (1<<9)
#define OB_KEKULE_MOL (1<<10)
#define OB_CLOSURE_MOL (1<<11)
#define OB_H_ADDED_MOL (1<<12)
#define OB_PH_CORRECTED_MOL (1<<13)
#define OB_AROM_CORRECTED_MOL (1<<14)
#define OB_CHAINS_MOL (1<<15)
#define OB_TCHARGE_MOL (1<<16)
#define OB_TSPIN_MOL (1<<17)
#define OB_RINGTYPES_MOL (1<<18)
#define OB_CURRENT_CONFORMER -1
#define BUFF_SIZE 32768
#define EQ(a, b) (!strcmp((a), (b)))
#define EQn(a, b, n) (!strncmp((a), (b), (n)))
#define SQUARE(x) ((x)*(x))
#define IsUnsatType(x) (EQ(x,"Car") || EQ(x,"C2") || EQ(x,"Sox") || EQ(x,"Sac") ||
EQ(x,"Pac") || EQ(x,"So2"))

Functions
void ThrowError (char *str)
void ThrowError (std::string &str)
void CartesianToInternal (std::vector< OBInternalCoord * > &, OBMol &)
void InternalToCartesian (std::vector< OBInternalCoord * > &, OBMol &)
std::string NewExtension (string &src, char *ext)
void get_rmat (double *, double *, double *, int)
void ob_make_rmat (double mat[3][3], double rmat[9])
void qtrfit (double *r, double *f, int size, double u[3][3])

Namespaces 1487
Open Babel: API Documentation

double superimpose (double *, double *, int)

Variables
OBElementTable etab
OBTypeTable ttab
OBIsotopeTable isotab
OBAromaticTyper aromtyper
OBAtomTyper atomtyper
OBChainsParser chainsparser
OBERROR OBMessageHandler obErrorLog
OBResidueData resdat

Detailed Description
Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open
Babel).

Define Documentation

#define OB_SSSR_MOL (1<<1)


Smallest Set of Smallest Rings (SSSR) done. See OBRing and OBMol::FindSSSR.

Referenced by OBMol::HasSSSRPerceived(), OBMol::SetSSSRPerceived(), OBMol::StripSalts(), and


OBMol::UnsetSSSRPerceived().

#define OB_RINGFLAGS_MOL (1<<2)


Ring flags have been set: See OBRing::FindRingAtomsAndBonds.

Referenced by OBMol::FindRingAtomsAndBonds(), OBMol::HasRingAtomsAndBondsPerceived(), and


OBMol::SetRingAtomsAndBondsPerceived().

#define OB_AROMATIC_MOL (1<<3)


Aromatic flags have been set for atoms and bonds.

Referenced by OBMol::HasAromaticPerceived(), OBMol::PerceiveBondOrders(),


OBMol::SetAromaticPerceived(), and OBMol::UnsetAromaticPerceived().

#define OB_ATOMTYPES_MOL (1<<4)


Atom typing has been performed. See OBAtomTyper.

Referenced by OBMol::AddHydrogens(), OBMol::HasAtomTypesPerceived(),


OBMol::PerceiveBondOrders(), and OBMol::SetAtomTypesPerceived().

Functions 1488
Open Babel: API Documentation

#define OB_CHIRALITY_MOL (1<<5)


Chirality detection has been performed. See OBMol::IsChiral.

Referenced by OBMol::HasChiralityPerceived(), and OBMol::SetChiralityPerceived().

#define OB_PCHARGE_MOL (1<<6)


Partial charges have been set or percieved.

Referenced by OBMol::AddHydrogens(), OBMol::HasPartialChargesPerceived(),


OBMol::SetPartialChargesPerceived(), and OBMol::UnsetPartialChargesPerceived().

#define OB_HYBRID_MOL (1<<8)


Atom hybridizations have been set. See OBAtomTyper.

Referenced by OBMol::HasHybridizationPerceived(), OBMol::PerceiveBondOrders(), and


OBMol::SetHybridizationPerceived().

#define OB_IMPVAL_MOL (1<<9)


Implicit valence has been set. See OBAtomTyper.

Referenced by OBMol::HasImplicitValencePerceived(), OBMol::PerceiveBondOrders(),


OBMol::SetImplicitValencePerceived(), and OBMol::UnsetImplicitValencePerceived().

#define OB_KEKULE_MOL (1<<10)


Kekule form has been set. See OBMol::Kekulize.

Referenced by OBMol::HasKekulePerceived(), OBMol::PerceiveBondOrders(), and


OBMol::SetKekulePerceived().

#define OB_CLOSURE_MOL (1<<11)


Ring "closure" bonds have been set. See OBBond::IsClosure.

Referenced by OBMol::HasClosureBondsPerceived(), and OBMol::SetClosureBondsPerceived().

#define OB_H_ADDED_MOL (1<<12)


Hyrdogen atoms have been added where needed. See OBMol::AddHydrogens.

Referenced by OBMol::HasHydrogensAdded(), OBMol::SetHydrogensAdded(), and


OBMol::UnsetHydrogensAdded().

#define OB_PH_CORRECTED_MOL (1<<13)


pH correction for hydrogen addition has been performed.

Define Documentation 1489


Open Babel: API Documentation

Referenced by OBMol::IsCorrectedForPH(), and OBMol::SetCorrectedForPH().

#define OB_AROM_CORRECTED_MOL (1<<14)


Aromaticity has been corrected. See OBAtomTyper::CorrectAromaticNitrogens.

Referenced by OBMol::HasAromaticCorrected(), and OBMol::SetAromaticCorrected().

#define OB_CHAINS_MOL (1<<15)


Biomolecular chains and residues have been set. See OBChainsParser.

Referenced by OBMol::HasChainsPerceived(), and OBMol::SetChainsPerceived().

#define OB_TCHARGE_MOL (1<<16)


Total charge on this molecule has been set. See OBMol::SetTotalCharge.

Referenced by OBMol::GetTotalCharge(), and OBMol::SetTotalCharge().

#define OB_TSPIN_MOL (1<<17)


Total spin on this molecule has been set. See OBMol::SetTotalSpinMultiplicity.

Referenced by OBMol::GetTotalSpinMultiplicity(), OBMol::HasSpinMultiplicityAssigned(),


OBMol::SetSpinMultiplicityAssigned(), and OBMol::SetTotalSpinMultiplicity().

#define OB_RINGTYPES_MOL (1<<18)


Ring typing has been performed. See OBRingTyper.

Referenced by OBMol::HasRingTypesPerceived(), OBMol::SetRingTypesPerceived(), and


OBMol::UnsetRingTypesPerceived().

#define OB_CURRENT_CONFORMER -1

Referenced by OBMol::Rotate(), and OBMol::Translate().

#define BUFF_SIZE 32768

Referenced by patty::assign_rules(), OBForceField::ConjugateGradientsInitialize(),


OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(),
DLHandler::findFiles(), OBRotorRules::GetRotorIncrements(), OBGlobalDataBase::Init(),
OBBuilder::LoadFragments(), OBAromaticTyper::ParseLine(), OBRotorRules::ParseLine(),
OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(),
OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), patty::read_rules(), OBRotorList::Setup(),

Define Documentation 1490


Open Babel: API Documentation

OBForceField::SteepestDescentInitialize(), OBForceField::SteepestDescentTakeNSteps(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
OBForceField::ValidateConjugateGradients(), OBForceField::ValidateSteepestDescent(), and
OBForceField::WeightedRotorSearch().

#define EQ ( a,
(!strcmp((a),
b )
(b)))

#define EQn ( a,
b,
n ) (!strncmp((a), (b), (n)))

Referenced by OBRingTyper::ParseLine(), OBAtomTyper::ParseLine(), OBRotorRules::ParseLine(), and


OBPhModel::ParseLine().

#define SQUARE ( x ) ((x)*(x))

#define (EQ(x,"Car") || EQ(x,"C2") || EQ(x,"Sox") || EQ(x,"Sac") || EQ(x,"Pac") ||


(x )
IsUnsatType EQ(x,"So2"))

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:53 2008 by 1.5.6.

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

Define Documentation 1491


molchrg.cpp File Reference
Assign Gasteiger partial charges. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/molchrg.h>

Namespaces
namespace OpenBabel

Detailed Description
Assign Gasteiger partial charges.

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:53 2008 by 1.5.6.

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

molchrg.cpp File Reference 1492


molchrg.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 molchrg.h - Assign Gasteiger partial charges.
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_MOLCHRG_H
00021 #define OB_MOLCHRG_H
00022
00023 namespace OpenBabel
00024 {
00025
00026 class GasteigerState;
00027
00028 // class introduction in molchrg.cpp
00029 class OBAPI OBGastChrg
00030 {
00031 std::vector <GasteigerState*> _gsv;
00032
00033 void InitialPartialCharges(OBMol &);
00034 bool GasteigerSigmaChi(OBAtom *,double &,double &,double &);
00035
00036 public:
00037 OBGastChrg() {}
00038 ~OBGastChrg();
00039
00041 bool AssignPartialCharges(OBMol &);
00043 void GSVResize(int);
00044 };
00045
00048 class OBAPI GasteigerState
00049 {
00050 public:
00051 GasteigerState();
00052 ~GasteigerState() {}
00053
00054 void SetValues(double _a,double _b,double _c,double _q)
00055 {
00056 a = _a;
00057 b = _b;
00058 c = _c;
00059 denom=a+b+c;

molchrg.h 1493
Open Babel: API Documentation
00060 q = _q;
00061 }
00062
00063 double a, b, c;
00064 double denom;
00065 double chi;
00066 double q;
00067 };
00068
00069 }
00070
00071 #define OB_GASTEIGER_DENOM 20.02
00072 #define OB_GASTEIGER_DAMP 0.5
00073 #define OB_GASTEIGER_ITERS 6
00074
00075 #endif // OB_MOLCHRG_H
00076

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

molchrg.h 1494
molchrg.h File Reference
Assign Gasteiger partial charges. 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 OBGastChrg
Assigns Gasteiger partial charges. More...
class GasteigerState
Helper class for OBGastChrg which stores the Gasteiger states of a given atom. More...

Defines
#define OB_GASTEIGER_DENOM 20.02
#define OB_GASTEIGER_DAMP 0.5
#define OB_GASTEIGER_ITERS 6

Detailed Description
Assign Gasteiger partial charges.

Define Documentation

#define OB_GASTEIGER_DENOM 20.02

Referenced by OBGastChrg::AssignPartialCharges().

#define OB_GASTEIGER_DAMP 0.5

molchrg.h File Reference 1495


Open Babel: API Documentation

Referenced by OBGastChrg::AssignPartialCharges().

#define OB_GASTEIGER_ITERS 6

Referenced by OBGastChrg::AssignPartialCharges().

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:53 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

Define Documentation 1496


OpenBabel Namespace Reference
Global namespace for all Open Babel code. More...

Classes
class AliasData
Indicate atoms as aliases for larger functional groups. More...
class OBAtom
Atom class. More...
class OBAtomClassData
Handle atom classes in reaction SMILES/SMIRKS. More...
class OBGenericData
Base class for generic data. More...
class OBBase
Base Class. More...
class OBBitVec
A speed-optimized vector of bits. More...
class OBBond
Bond class. More...
class OBBondTyper
Assigns bond types for file formats without bond information.
More...
class OBBuilder
Class to build 3D structures. More...
class OBChainsParser
Perceives peptide or nucleotide chains and residues in an OBMol.
More...
class OBGlobalDataBase
Base data table class, handles reading data files. More...
class OBElement
Individual element data type. More...
class OBElementTable
Periodic Table of the Elements. More...
class OBIsotopeTable
Table of atomic isotope masses. More...
class OBTypeTable
Atom Type Translation Table. More...
class OBResidueData
Table of common biomolecule residues (for PDB or other files).
More...
class OBDescriptor
Base class for molecular properties, descriptors or features. More...
class OBFingerprint
The base class for fingerprints. More...
struct FptIndexHeader
Header for fastsearch index file. More...
struct FptIndex
Structure of fastsearch index files. More...

OpenBabel Namespace Reference 1497


Open Babel: API Documentation
class FastSearch
Class to search fingerprint index files. More...
class FastSearchIndexer
Class to prepare fingerprint index files See FastSearch class for
details. More...
struct LineSearchType
The type of line search to be used for optimization -- simple or
Newton numeric. More...
class OBFFParameter
Internal class for OBForceField to hold forcefield parameters. More...
class OBFFCalculation2
Internal class for OBForceField to hold energy and gradient
calculations on specific force fields. More...
class OBFFCalculation3
Internal class for OBForceField to hold energy and gradient
calculations on specific force fields. More...
class OBFFCalculation4
Internal class for OBForceField to hold energy and gradient
calculations on specific force fields. More...
class OBFFConstraint
Internal class for OBForceField to hold constraints. More...
class OBFFConstraints
Internal class for OBForceField to handle constraints. More...
class OBForceField
Base class for molecular mechanics force fields. More...
class OBFormat
Base class for file formats. More...
class OBCommentData
Used to store a comment string (can be multiple lines long). More...
class OBExternalBond
Used to store information on an external bond (e.g., SMILES
fragments). More...
class OBExternalBondData
Used to store information on external bonds (e.g., in SMILES
fragments). More...
class OBPairData
Used to store arbitrary text attribute/value relationships. More...
class OBPairTemplate
Used to store arbitrary attribute/value relationsips of any type.
More...
class OBSetData
Used to store arbitrary attribute/set relationships. Should be used to
store a set of OBGenericData based on an attribute. More...
class OBVirtualBond
Used to temporarily store bonds that reference an atom that has not
yet been added to a molecule. More...
class OBRingData
Used to store the SSSR set (filled in by OBMol::GetSSSR()). More...
class OBUnitCell
Used for storing information about periodic boundary conditions with
conversion to/from translation vectors and (a, b, c, alpha, beta,

Classes 1498
Open Babel: API Documentation
gamma). More...
class OBConformerData
Used to hold data on conformers or geometry optimization steps.
More...
class OBSymmetryData
Used to hold the point-group and/or space-group symmetry. More...
class OBTorsion
Used to hold the torsion data for a single rotatable bond and all four
atoms around it. More...
class OBTorsionData
Used to hold torsions as generic data for OBMol. More...
class OBAngle
Used to hold the 3 atoms in an angle and the angle itself. More...
class OBAngleData
Used to hold all angles in a molecule as generic data for OBMol.
More...
class OBChiralData
Used to hold chiral inforamtion about the atom as OBGenericData.
More...
class OBSerialNums
Defines a map between serial numbers (e.g., in a PDB file) and
OBAtom objects inside a molecule. More...
class OBVibrationData
Used to hold the normal modes of a molecule, etc. More...
class OBRotationData
Used to hold the rotational constants and symmetry numbers. More...
class OBVectorData
Used to hold a 3D vector item (e.g., a dipole moment). More...
class OBMatrixData
Used to hold a 3x3 matrix item (e.g., a quadrupole moment). More...
class OBGrid
A base grid class. More...
class OBFloatGrid
Handle double precision floating point 3D grids (e.g., charge density
around an OBMol). More...
class OBProxGrid
A grid for determining the proximity of a given point to atoms in an
OBMol. More...
class OBScoreGrid
A base class for scoring docking interactions between multiple
molecules. More...
class OBGridData
Store values for numeric grids such as orbitals or electrostatic
potential. More...
class OBGroupContrib
Handle group contribution algorithms. More...
class OBInternalCoord
Used to transform from z-matrix to cartesian coordinates. More...
class OBRateData
Holds rate constant data for OBReaction. More...
class OBNasaThermoData

Classes 1499
Open Babel: API Documentation
Thermodynamic data in old style NASA polynomial form for
OBMol. More...
class FilteringInputStreambuf
Delivers characters from an istream or streambuf from a source while
filtering. More...
class LineEndingExtractor
Replaces CRLF (DOS) and CR (Mac OS 9) line endings by LF
(POSIX). More...
class OBLocale
Handle the locale for numeric data parsing. More...
class OBMol
Molecule Class. More...
class OBGastChrg
Assigns Gasteiger partial charges. More...
class GasteigerState
Helper class for OBGastChrg which stores the Gasteiger states of a
given atom. More...
class OBConversion
Class to convert from one format to another. More...
class OBError
Customizable error handling and logging -- store a message,
including the method yielding the error, causes, etc. More...
class OBMessageHandler
Handle error messages, warnings, debugging information and the
like. More...
class obLogBuf
A minimal streambuf derivative to wrap calls to cerr into calls to
OBMessageHandler as needed. More...
class OBMolAtomIter
Iterate over all atoms in an OBMol. More...
class OBMolAtomDFSIter
Iterate over all atoms in an OBMol in a depth-first search (DFS).
More...
class OBMolAtomBFSIter
Iterate over all atoms in an OBMol in a breadth-first search (BFS).
More...
class OBMolBondIter
Iterate over all bonds in an OBMol. More...
class OBAtomAtomIter
Iterate over all neighboring atoms to an OBAtom. More...
class OBAtomBondIter
Iterate over all bonds on an OBAtom. More...
class OBResidueIter
Iterate over all residues in an OBMol. More...
class OBResidueAtomIter
Iterate over all atoms in an OBResidue. More...
class OBMolAngleIter
Iterate over all angles in an OBMol. More...
class OBMolTorsionIter
Iterate over all torsions in an OBMol. More...
class OBMolPairIter

Classes 1500
Open Babel: API Documentation
Iterate over all pairs of atoms (>1-4) in an OBMol. More...
class OBMolRingIter
Iterate over all rings in an OBMol. More...
class OBMoleculeFormat
An OBFormat convenience subclass for conversion to/from OBMol
data. More...
class OBStopwatch
Stopwatch class used for timing length of execution. More...
class OBSqrtTbl
Square Root lookup table - given a distance squared returns distance.
More...
class triple
A 3-element templated, based on the design of the STL pair<>.
More...
class quad
A 4-element templated, based on the design of the STL pair<>.
More...
class OBOp
Operations to modify molecules before output. More...
class OpTransform
Applies molecular transforms (OBChemTsfm class) read from a
datafile. More...
union _AtomExpr
An internal (SMARTS parser) atomic expression. More...
union _BondExpr
An internal (SMARTS parser) bond expression. More...
struct BondSpec
An internal (SMARTS parser) bond specification. More...
struct AtomSpec
An internal (SMARTS parser) atom specification. More...
struct Pattern
A SMARTS parser internal pattern. More...
class OBSmartsPattern
SMARTS (SMiles ARbitrary Target Specification) substructure
searching. More...
class OBSSMatch
Internal class: performs fast, exhaustive matching used to find just a
single match in match() using recursion and explicit stack handling.
More...
class patty
Programmable Atom Typer. More...
class OBChemTsfm
SMARTS based structural modification (chemical transformation).
More...
class OBPhModel
Corrections for pH used by OBMol::CorrectForPH(). More...
struct CharPtrLess
Case insensitive string comparison for PluginMapType key. More...
class OBPlugin
Base class for all types of dynamic classes discovered at runtime.
More...

Classes 1501
Open Babel: API Documentation
class OBPointGroup
Brute-force point group symmetry perception. More...
struct DoubleType
Used for internal random number generation OBRandom (unless the
system random generator is used). More...
class OBRandom
Random number generator. More...
class OBReaction
Used to store chemical reactions (i.e., reactants -> products). More...
class OBResidue
Residue information. More...
class OBRing
Stores information on rings in a molecule from SSSR perception.
More...
class OBRingSearch
Internal class to facilitate OBMol::FindSSSR(). More...
class OBRTree
Internal class for OBRing search algorithms to create a search tree of
OBAtom objects. More...
class OBRotamerList
Supports a set of rotamer coordinate sets for some number of
potentially rotatable bonds. More...
class OBRotorRule
A rule for torsional conformer searching, defined by a SMARTS
pattern. More...
class OBRotorRules
Database of default hybridization torsional rules and
SMARTS-defined OBRotorRule objects. More...
class OBRotor
A single rotatable OBBond as part of rotamer searching. More...
class OBRotorList
Given an OBMol, set up a list of possibly rotatable torsions,. More...
class OBRotorKeys
A class to generate all possible rotorKeys. More...
class OBAtomTyper
Assigns atom types, hybridization, implicit valence and formal
charges. More...
class OBAromaticTyper
Assigns aromatic typing to atoms and bonds. More...
class OBRingTyper
Assigns ring types. More...
class XMLConversion
A subclass for conversion of XML formats. More...
class XMLBaseFormat
Abstract class containing common functionality for XML formats.
More...
class XMLMoleculeFormat
Abstract class for XML formats which represent molecules. More...
class matrix3x3
Represents a real 3x3 matrix. More...
class SpaceGroup

Classes 1502
Open Babel: API Documentation
Handle crystallographic space group symmetry. More...
class transform3d
Handle 3D transformations, such as space group definitions. More...
class vector3
Represents a vector in 3-dimensional real space. More...

Namespaces
namespace OBGenericDataType
namespace OBAminoAcidProperty
namespace OBResidueAtomProperty
namespace OBResidueIndex
namespace OBResidueProperty

Typedefs
typedef OBAtom OBNodeBase
typedef std::vector< OBBond * >
::iterator OBBondIterator
typedef std::vector< OBAtom * >
::iterator OBAtomIterator
typedef std::vector
< OBGenericData * >::iterator OBDataIterator
typedef OBBond OBEdgeBase
typedef struct Template Template
typedef OBPairTemplate< int > OBPairInteger
typedef OBPairTemplate< double > OBPairFloatingPoint
typedef OBPlugin::PluginIterator Formatpos
typedef union OpenBabel::_AtomExpr AtomExpr
typedef union OpenBabel::_BondExpr BondExpr
typedef std::vector< OBResidue * >
::iterator OBResidueIterator
typedef std::vector< OBRotor * >
::iterator OBRotorIterator
typedef std::list< transform3d * >
::const_iterator transform3dIterator
typedef union OpenBabel::_ByteCode ByteCode

Enumerations
enum DataOrigin {
any, fileformatInput, userInput, perceived,
external
}
enum atomreftype { output, input, calcvolume }
enum score_t { Undefined = -1, PLP, ChemScore }
enum obMessageLevel {
obError, obWarning, obInfo, obAuditMsg,
obDebug

Namespaces 1503
Open Babel: API Documentation

}
enum errorQualifier { always, onceOnly }
enum { SPACE_GROUP_ID, SPACE_GROUP_HALL,
SPACE_GROUP_HM, SPACE_GROUP_TRANSFORM }

Functions
OBERROR double Tanimoto (const OBBitVec &bv1, const OBBitVec &bv2)
void CanonicalLabels (OBMol *pmol, OBBitVec &frag_atoms,
std::vector< unsigned int > &symmetry_classes, std::vector<
unsigned int > &canonical_labels)
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)
template<class T>
static bool DoComparison (char ch1, char ch2, T &val, T &filterval)
void print_matrix (std::vector< std::vector< double > > &m)
void print_matrix_f (double *m, int rows, int cols)
void print_matrix_ff (double **m, int rows, int cols)
bool mult_matrix (std::vector< std::vector< double > > &c, std::vector<
std::vector< double > > &a, std::vector< std::vector< double > > &b)
bool mult_matrix_f (double *c, double *a, double *b, int rows, int cols)
bool mult_matrix_ff (double **c, double **a, double **b, int rows, int
cols)
bool invert_matrix (std::vector< std::vector< double > > &m, double
&det)
bool invert_matrix_f (double *m, double &det, int rows, int cols)
bool invert_matrix_ff (double **m, double &det, int rows, int cols)
bool convert_matrix_f (std::vector< std::vector< double > > &src, double
*dst)
bool convert_matrix_ff (std::vector< std::vector< double > > &src, double
**dst)
bool convert_matrix_f (double *src, std::vector< std::vector< double > >
&dst, int rows, int cols)
bool convert_matrix_ff (double **src, std::vector< std::vector< double > >
&dst, int rows, int cols)
bool convert_matrix_ff_f (double **src, double *dst, int rows, int cols)
bool convert_matrix_f_ff (double *src, double **dst, int rows, int cols)
void ThrowError (char *str)
void ThrowError (std::string &str)
void

Enumerations 1504
Open Babel: API Documentation
CartesianToInternal (std::vector< OBInternalCoord * > &, OBMol
&)
void InternalToCartesian (std::vector< OBInternalCoord * > &, OBMol
&)
std::string NewExtension (string &src, char *ext)
void get_rmat (double *, double *, double *, int)
void ob_make_rmat (double mat[3][3], double rmat[9])
void qtrfit (double *r, double *f, int size, double u[3][3])
double superimpose (double *, double *, int)
void rotate_coords (double *, double m[3][3], int)
double calc_rms (double *r, double *f, unsigned int N)
bool OBCompareInt (const int &a, const int &b)
bool OBCompareUnsigned (const unsigned int &a, const unsigned int &b)
bool IsNear (const double &a, const double &b, const double epsilon)
bool IsNearZero (const double &a, const double epsilon)
bool IsNan (const double &a)
bool IsNegligible (const double &a, const double &b, const double
precision=1e-11)
bool IsApprox (const double &a, const double &b, const double
precision=1e-11)
bool IsApprox_pos (const double &a, const double &b, const double
precision=1e-11)
bool CanBeSquared (const double &)
bool SafeOpen (std::ifstream &fs, const char *filename)
bool SafeOpen (std::ofstream &fs, const char *filename)
void SmartsLexReplace (std::string &, std::vector< std::pair< std::string,
std::string > > &)
void DoubleMultiply (unsigned int, unsigned int, DoubleType *)
void DoubleAdd (DoubleType *, unsigned int)
unsigned int DoubleModulus (DoubleType *, unsigned int)
bool CompareRingSize (const OBRing *, const OBRing *)
int Swab (int)
OBERROR bool tokenize (std::vector< std::string > &, const char *buf, const char
*delimstr=" \t\n\r")
OBERROR bool tokenize (std::vector< std::string > &, std::string &, const char
*delimstr=" \t\n\r", int limit=-1)
OBERROR std::string & Trim (std::string &txt)
OBERROR std::string OpenDatafile (std::ifstream &fs, const std::string &filename, const
std::string &envvar="BABEL_DATADIR")
vector3 center_coords (double *, int)
std::ostream & operator<< (std::ostream &, const vector3 &)
vector3 operator+ (const vector3 &v1, const vector3 &v2)
vector3 operator- (const vector3 &v1, const vector3 &v2)
vector3 operator- (const vector3 &v)
vector3 operator* (const double &c, const vector3 &v)
vector3 operator* (const vector3 &v, const double &c)
vector3 operator/ (const vector3 &v, const double &c)
vector3 operator* (const matrix3x3 &m, const vector3 &v)
double dot (const vector3 &v1, const vector3 &v2)
vector3 cross (const vector3 &, const vector3 &)
double vectorAngle (const vector3 &v1, const vector3 &v2)

Functions 1505
Open Babel: API Documentation
double CalcTorsionAngle (const vector3 &a, const vector3 &b, const
vector3 &c, const vector3 &d)
double Point2Plane (vector3 a, vector3 b, vector3 c, vector3 d)
double Point2PlaneAngle (const vector3 a, const vector3 b, const vector3 c,
const vector3 d)
static void ApplyRotMatToBond (OBMol &mol, matrix3x3 &m, OBAtom *a1,
OBAtom *a2)
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)
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)
static ByteCode * AllocateByteCode (int type)
static void DeleteByteCode (ByteCode *node)

Functions 1506
Open Babel: API Documentation
static void FatalMemoryError (void)
void GenerateByteCodes (ByteCode **node, int resid, int curr, int prev,
int bond)
void Toupper (string &s)
void Tolower (string &s)
void Reweight (std::vector< std::vector< double > > &rotorWeights,
std::vector< int > rotorKey, double bonus)
ostream & operator<< (ostream &os, const OBFloatGrid &fg)
istream & operator>> (istream &is, OBFloatGrid &fg)
bool SortVVInt (const vector< int > &a, const vector< int > &b)
bool SortAtomZ (const pair< OBAtom *, double > &a, const pair<
OBAtom *, double > &b)
static bool OBComparePairSecond (const pair< OBAtom *, unsigned int > &a,
const pair< OBAtom *, unsigned int > &b)
static bool OBComparePairFirst (const pair< OBAtom *, unsigned int > &a,
const pair< OBAtom *, unsigned int > &b)
static void ClassCount (vector< pair< OBAtom *, unsigned int > > &vp,
unsigned int &count)
static void CreateNewClassVector (vector< pair< OBAtom *, unsigned int > >
&vp1, vector< pair< OBAtom *, unsigned int > > &vp2)
static int ValenceSum (OBAtom *atom)
static bool KekulePropagate (OBAtom *atom, vector< int > &visit, vector< int >
&ival, int depth)
int GetCurrentValence (OBAtom *atom)
bool ExpandKekule (OBMol &mol, vector< OBAtom * > &va, vector<
OBAtom * >::iterator i, vector< int > &maxv, bool secondpass)
void CorrectBadResonanceForm (OBMol &mol)
bool WriteTitles (ostream &ofs, OBMol &mol)
vector3 center_coords (double *c, unsigned int size)
void rotate_coords (double *c, double m[3][3], unsigned int size)
void SetRotorToAngle (double *c, vector< int > &tor, double ang, vector<
int > &atoms)
bool SafeOpen (std::ifstream &fs, const string &filename)
bool SafeOpen (std::ofstream &fs, const string &filename)
void InvertCase (std::string &s, unsigned int start)
int SolveLinear (double A, double B)
int SolveQuadratic (double A, double B, double C)
double CubeRoot (double X)
int SolveCubic (double A, double B, double C, double D)
static int get_roots_3_3 (double mat[3][3], double roots[3])
OpCenter theOpCenter ("center")
static bool match (OBMol &mol, Pattern *pat, std::vector< std::vector< int > >
&mlist, bool single=false)
static bool EvalAtomExpr (AtomExpr *expr, OBAtom *atom)
static bool EvalBondExpr (BondExpr *expr, OBBond *bond)
static int GetVectorBinding ()
static int CreateAtom (Pattern *, AtomExpr *, int, int vb=0)
static void FatalAllocationError (const char *ptr)
static void FreePattern (Pattern *)
static Pattern * CopyPattern (Pattern *)
static AtomExpr * AllocAtomExpr (void)

Functions 1507
Open Babel: API Documentation
static AtomExpr * CopyAtomExpr (AtomExpr *expr)
static void FreeAtomExpr (AtomExpr *expr)
static AtomExpr * BuildAtomLeaf (int prop, int val)
static AtomExpr * BuildAtomNot (AtomExpr *expr)
static AtomExpr * BuildAtomBin (int op, AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * BuildAtomRecurs (Pattern *pat)
static AtomExpr * GenerateElement (int elem)
static AtomExpr * GenerateAromElem (int elem, int flag)
static int IsInvalidAtom (AtomExpr *expr)
static BondExpr * AllocBondExpr (void)
static BondExpr * CopyBondExpr (BondExpr *expr)
static bool EquivalentBondExpr (BondExpr *expr1, BondExpr *expr2)
static void FreeBondExpr (BondExpr *expr)
static BondExpr * BuildBondLeaf (int prop, int val)
static BondExpr * BuildBondNot (BondExpr *expr)
static BondExpr * BuildBondBin (int op, BondExpr *lft, BondExpr *rgt)
static BondExpr * GenerateDefaultBond (void)
static Pattern * AllocPattern (void)
static int CreateBond (Pattern *pat, BondExpr *expr, int src, int dst)
static Pattern * ParseSMARTSPattern (void)
static Pattern * ParseSMARTSPart (Pattern *, int)
static Pattern * SMARTSError (Pattern *pat)
static AtomExpr * ParseSimpleAtomPrimitive (void)
static AtomExpr * ParseComplexAtomPrimitive (void)
static AtomExpr * ParseAtomExpr (int level)
static BondExpr * ParseBondPrimitive (void)
static BondExpr * ParseBondExpr (int level)
static Pattern * ParseSMARTSError (Pattern *pat, BondExpr *expr)
static Pattern * SMARTSParser (Pattern *pat, ParseState *stat, int prev, int part)
static void MarkGrowBonds (Pattern *pat)
static int GetChiralFlag (AtomExpr *expr)
static Pattern * ParseSMARTSString (char *ptr)
Pattern * ParseSMARTSRecord (char *ptr)
static void TraverseSMARTS (Pattern *pat, int i)
static AtomExpr * NotAtomExpr (AtomExpr *)
static AtomExpr * AndAtomExpr (AtomExpr *, AtomExpr *)
static AtomExpr * OrAtomExpr (AtomExpr *, AtomExpr *)
static int IsBooleanAtomLeaf (AtomExpr *expr)
static int IsNegatingAtomLeaf (AtomExpr *expr)
static int EqualAtomExpr (AtomExpr *lft, AtomExpr *rgt)
static int OrderAtomExpr (AtomExpr *lft, AtomExpr *rgt)
static int AtomLeafConflict (AtomExpr *lft, AtomExpr *rgt)
static int AtomExprConflict (AtomExpr *lft, AtomExpr *rgt)
static int AtomLeafImplies (AtomExpr *lft, AtomExpr *rgt)
static int AtomExprImplied (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * AtomExprImplies (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * AndAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * ConstrainRecursion (AtomExpr *recur, AtomExpr *expr)
static AtomExpr * OrAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
static int GetBondLeafIndex (BondExpr *expr)
static int GetBondExprIndex (BondExpr *expr)

Functions 1508
Open Babel: API Documentation
void SetupAtomMatchTable (std::vector< std::vector< bool > > &ttab,
Pattern *pat, OBMol &mol)
static void FastSingleMatch (OBMol &mol, Pattern *pat, std::vector<
std::vector< int > > &mlist)
static int GetExprOrder (BondExpr *expr)
void SmartsLexReplace (std::string &s, std::vector< std::pair< std::string,
std::string > > &vlex)
static unsigned int isqrt (unsigned int val)
static int IsOddPrime (unsigned int x)
static int RelativelyPrime (unsigned int x, unsigned int y)
static int LeadingZeros (unsigned int x)
static int DeterminePotency (unsigned int m, unsigned int a)
static int DetermineFactors (unsigned int x, unsigned int *factors)
static unsigned int DetermineIncrement (unsigned int m)
int DetermineSequence (unsigned int m, unsigned int *pm, unsigned int
*pa, unsigned int *pc)
void GenerateSequence (unsigned int p, unsigned int m, unsigned int a,
unsigned int c)
static unsigned int GetAtomIDNumber (const char *atomid)
static unsigned int GetResidueNumber (const char *res)
static void SetResidueKeys (const char *residue, unsigned int &reskey,
unsigned int &aakey)
static int DetermineFRJ (OBMol &)
static void BuildOBRTreeVector (OBAtom *, OBRTree *, vector< OBRTree *
> &, OBBitVec &)
static void FindRings (OBMol &mol, vector< int > &path, OBBitVec &avisit,
OBBitVec &bvisit, int natom, int depth)
double rint (double x)
void SetRotorToAngle (double *c, OBAtom **ref, double ang, vector< int
> atoms)
int PackCoordinate (double c[3], double max[3])
void UnpackCoordinate (double c[3], double max[3], int tmp)
static bool GetDFFVector (OBMol &, vector< int > &, OBBitVec &)
static bool CompareRotor (const pair< OBBond *, int > &, const pair< OBBond
*, int > &)
static double MinimumPairRMS (OBMol &, double *, double *, bool &)
char * trim_spaces (char *string)
matrix3x3 operator* (const matrix3x3 &A, const matrix3x3 &B)
static double SQUARE (double x)
ostream & operator<< (ostream &co, const matrix3x3 &m)
const vector3 VZero (0.0, 0.0, 0.0)
const vector3 VX (1.0, 0.0, 0.0)
const vector3 VY (0.0, 1.0, 0.0)
const vector3 VZ (0.0, 0.0, 1.0)
String conversion utilities
void ToUpper (std::string &s)
void ToUpper (char *cptr)
void ToLower (std::string &s)
void ToLower (char *cptr)
void InvertCase (std::string &, int)
void InvertCase (char *cptr)

Functions 1509
Open Babel: API Documentation

void CleanAtomType (char *)

Variables
const unsigned int AliasDataType = 0x7883
const unsigned RateData = 55555
const unsigned ThermoData = 55556
OBERROR OBLocale obLocale
OBElementTable etab
OBTypeTable ttab
OBIsotopeTable isotab
OBAromaticTyper aromtyper
OBAtomTyper atomtyper
OBChainsParser chainsparser
OBERROR OBMessageHandler obErrorLog
OBResidueData resdat
char Residue [MAXRES][4]
char ElemDesc [MAXELEM][4]
unsigned int ResNo = MINRES
unsigned int ElemNo = MINELEM
const vector3 VZero
const vector3 VX
const vector3 VY
const vector3 VZ
OBPhModel phmodel
static int bitsoff [SETWORD]
const unsigned nibble_bit_count [0x10]
OBBondTyper bondtyper
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
bool SwabInt = (STPTR[0]!=0)
static double Roots [4]
std::vector< std::pair
< Pattern *, std::vector< bool > > > RSCACHE
static char * MainPtr
static char * LexPtr
static char Buffer [BUFF_SIZE]
static char Descr [BUFF_SIZE]

Variables 1510
Open Babel: API Documentation

POINT_GROUP PointGroups []
static int primes [MAXPRIMES]
OBRingTyper ringtyper
static int SINT = 0x00000001
static unsigned char * STPTR = (unsigned char*)&SINT
static SpaceGroups _SpaceGroups

Detailed Description
Global namespace for all Open Babel code.

Typedef Documentation

typedef OBAtom OBNodeBase


OBNodeBase is declared for backwards-compatibility with 2.0 and earlier code.

typedef std::vector< OBBond * >::iterator OBBondIterator


A standard iterator over a vector of bonds.

typedef std::vector< OBAtom * >::iterator OBAtomIterator


A standard iterator over a vector of atoms.

typedef std::vector< OBGenericData * >::iterator OBDataIterator


A standard iterator over vectors of OBGenericData (e.g., inherited from OBBase).

typedef OBBond OBEdgeBase


OBEdgeBase is declared for backwards-compatibility with 2.0 and earlier code.

typedef struct OpenBabel::Template Template


Structure template for atomic patterns in residues for OBChainsParser.

typedef OBPairTemplate<int> OBPairInteger


Store arbitrary key/value integer data like OBPairData.

typedef OBPairTemplate<double> OBPairFloatingPoint


Store arbitrary key/value floating point data like OBPairData.

typedef OBPlugin::PluginIterator Formatpos

Detailed Description 1511


Open Babel: API Documentation

typedef union OpenBabel::_AtomExpr AtomExpr

typedef union OpenBabel::_BondExpr BondExpr

typedef std::vector<OBResidue*>::iterator OBResidueIterator


A standard iterator over a vector of residues.

typedef std::vector<OBRotor*>::iterator OBRotorIterator


A standard iterator over a vector of rotors.

typedef std::list<transform3d*>::const_iterator transform3dIterator

typedef union OpenBabel::_ByteCode ByteCode


Chemical graph matching virtual machine.

Enumeration Type Documentation

enum DataOrigin

Enumerator:
any Undefined or unspecified (default).
fileformatInput Read from an input file.
userInput Added by the user.
perceived Perceived by Open Babel library methods.
external Added by an external program.

enum atomreftype

Enumerator:
output
input
calcvolume

enum score_t

Enumerator:
Undefined
PLP
ChemScore

Typedef Documentation 1512


Open Babel: API Documentation

enum obMessageLevel
Levels of error and audit messages to allow filtering.

Enumerator:
obError for critical errors (e.g., cannot read a file)
obWarning for non-critical problems (e.g., molecule appears empty)
obInfo for informative messages (e.g., file is a non-standard format)
obAuditMsg for messages auditing methods which destroy or perceive molecular data (e.g.,
kekulization, atom typing, etc.)
obDebug for messages only useful for debugging purposes

enum errorQualifier

Enumerator:
always
onceOnly

anonymous enum

Enumerator:
SPACE_GROUP_ID
SPACE_GROUP_HALL
SPACE_GROUP_HM
SPACE_GROUP_TRANSFORM

Function Documentation

double Tanimoto ( const OBBitVec & bv1,


const OBBitVec & bv2
)
The Tanimoto coefficient, which may be regarded as the proportion of the "on-bits" which are shared.

The Tanimoto coefficient may be regarded as the proportion of the "on-bits" which are shared.

Parameters:
[in] bv1 the first bit vector
[in] bv2 the second bit vector

Returns:
the ratio of shared bits to bits which either vector has set.

Referenced by FastSearch::FindSimilar().

void CanonicalLabels ( OBMol * pmol,

Enumeration Type Documentation 1513


Open Babel: API Documentation

OBBitVec & frag_atoms,


std::vector< unsigned int > & symmetry_classes,
std::vector< unsigned int > & canonical_labels
)

void GraphPotentials ( OBMol & mol,


std::vector< double > & pot
)
Calculate the Graph Potentials of a molecule.

based on V.E. and Rozenblit, A.B. Golender Logical and Combinatorial Algorithms for Drug Design.
For an example see: Walters, W. P., Yalkowsky, S. H., JCICS, 1996, 36(5), 1015-1017. DOI:
10.1021/ci950278o

void construct_g_matrix ( OBMol & mol,


std::vector< std::vector< double > > & m
)
Construct the matrix G, which puts each atoms valence+1 on the diagonal and and -1 on the off diagonal if
two atoms are connected.

Referenced by GraphPotentials().

void construct_c_matrix ( OBMol & mol,


std::vector< std::vector< double > > & m
)
Construct the matrix C, which is simply a column vector consisting of the valence for each atom

Referenced by GraphPotentials().

double CalcSignedVolume ( OBMol & mol,


OBAtom * atm,
bool ReZeroZ
)
Calculate the signed volume for an atom.

Calculate the signed volume for an atom. If the atom has a valence of 3 the coordinates of an attached
hydrogen are calculated Puts attached Hydrogen last at the moment, like mol V3000 format. If ReZero=false
(the default is true) always make pseudo z coords and leave them in mol

Referenced by GetChirality().

double signed_volume ( const vector3 & a,

Function Documentation 1514


Open Babel: API Documentation

const vector3 & b,


const vector3 & c,
const vector3 & d
)
Calculate a signed volume given a set of 4 coordinates.

Referenced by CalcSignedVolume().

void GetChirality ( OBMol & mol,


std::vector<
chirality
int > &
)

int GetParity4Ref ( std::vector< unsigned int > pref )


Calculates parity of a vector of 4 items.

Referenced by CorrectChirality().

bool CorrectChirality ( OBMol & mol,


OBAtom * atm,
atomreftype i = input,
atomreftype o = output
)

static bool OpenBabel::DoComparison ( char ch1,


char ch2,
T& val,
T& filterval
[inline,
)
static]

Referenced by OBDescriptor::Compare(), and OBDescriptor::CompareStringWithFilter().

void print_matrix ( std::vector< std::vector< double > > & m )

void print_matrix_f ( double * m,


int rows,
int cols
)

Function Documentation 1515


Open Babel: API Documentation

void print_matrix_ff ( double ** m,


int rows,
int cols
)

bool mult_matrix ( std::vector< std::vector< double > > & c,


std::vector< std::vector< double > > & a,
std::vector< std::vector< double > > & b
)

Referenced by GraphPotentials().

bool mult_matrix_f ( double * c,


double * a,
double * b,
int rows,
int cols
)

bool mult_matrix_ff ( double ** c,


double ** a,
double ** b,
int rows,
int cols
)

bool invert_matrix ( std::vector< std::vector< double > > & m,


double & det
)

Referenced by GraphPotentials().

double
bool invert_matrix_f ( m,
*
double
det,
&
int rows,
int cols
)

Function Documentation 1516


Open Babel: API Documentation

bool invert_matrix_ff ( double ** m,


double & det,
int rows,
int cols
)

bool convert_matrix_f ( std::vector< std::vector< double > > & src,


double * dst
)

bool convert_matrix_ff ( std::vector< std::vector< double > > & src,


double ** dst
)

bool convert_matrix_f ( double * src,


std::vector< std::vector< double > > & dst,
int rows,
int cols
)

bool convert_matrix_ff ( double ** src,


std::vector< std::vector< double > > & dst,
int rows,
int cols
)

bool convert_matrix_ff_f ( double ** src,


double * dst,
int rows,
int cols
)

bool convert_matrix_f_ff ( double * src,


double ** dst,
int rows,
int cols
)

Function Documentation 1517


Open Babel: API Documentation

void ThrowError ( char * str )


Deprecated: use the OBMessageHandler class instead

Deprecated:
Throw an error through the OpenBabel::OBMessageHandler class

void ThrowError ( std::string & str )


Deprecated: use the OBMessageHandler class instead

Deprecated:
Throw an error through the OpenBabel::OBMessageHandler class

std::vector<
void CartesianToInternal ( OBInternalCoord * > vic,
&
OBMol & mol
)
Convert Cartesian XYZ to a set of OBInternalCoord coordinates.

Use the supplied OBMol and its Cartesian coordinates to generate a set of internal (z-matrix) coordinates as
supplied in the vector<OBInternalCoord*> argument. Implements
blue-obelisk:cartesianCoordinatesIntoZmatrixCoordinates.

Referenced by OBMol::GetInternalCoord().

std::vector<
void InternalToCartesian ( OBInternalCoord * > vic,
&
OBMol & mol
)
Convert set of OBInternalCoord coordinates into Cartesian XYZ.

Transform the supplied vector<OBInternalCoord*> into cartesian and update the OBMol accordingly.
Implements blue-obelisk:zmatrixCoordinatesIntoCartesianCoordinates

std::string
string NewExtension ( src,
&
char * ext
)
Utility function: replace the last extension in string &src with new extension char *ext.

void get_rmat ( double * rvec,


double * r,

Function Documentation 1518


Open Babel: API Documentation

double * f,
int size
)

void ob_make_rmat ( double mat[3][3],


double rmat[9]
)

Referenced by get_roots_3_3(), and OBMol::ToInertialFrame().

void qtrfit ( double * r,


double * f,
int size,
double u[3][3]
)

double superimpose ( double * r,


double * f,
int size
)

void OpenBabel::rotate_coords ( double * ,


double m[3][3],
int
)

double calc_rms ( double * r,


double * f,
unsigned int N
)
Calculate the RMS deviation between the first N coordinates of *r and *f.

void ToUpper ( std::string & s )


Shift the supplied string to uppercase.

void ToUpper ( char * cptr )


Shift the supplied char* to uppercase.

Function Documentation 1519


Open Babel: API Documentation

void ToLower ( std::string & s )


Shift the supplied string to lowercase.

void ToLower ( char * cptr )


Shift the supplied char* to lowercase.

void OpenBabel::InvertCase ( std::string & ,


int
)

void InvertCase ( char * cptr )


Shift the supplied char*: lowercase to upper, and upper to lower.

char
void CleanAtomType ( id )
*
"Clean" the supplied atom type

"Clean" the supplied atom type, shifting the first character to uppercase, the second character (if it's a letter) to
lowercase, and terminating with a NULL to strip off any trailing characters

bool OBCompareInt ( const int & a,


const int & b
)
Comparison -- returns true if first parameter less than second

Returns:
True if a < b, False otherwise.

bool OBCompareUnsigned ( const unsigned int & a,


const unsigned int & b
)
Comparison -- returns true if first parameter less than second

Returns:
True if a < b, False otherwise.

Referenced by CreateNewClassVector().

bool IsNear ( const double & a,


const double & b,

Function Documentation 1520


Open Babel: API Documentation

const double epsilon = 2e-6


)
Comparison for doubles: returns fabs(a - b) < epsilon.

"Safe" comparison for floats/doubles: returns fabs(a - b) < epsilon This function really doesn't make any sense
w.r.t. floating-point representation, so you should never use it. It is provided only for backwards
compatibility.

Deprecated:
Use IsApprox() instead

Referenced by OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::LineSearch(),


OBForceField::SteepestDescentTakeNSteps(), OBForceField::ValidateConjugateGradients(),
OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

bool IsNearZero ( const double & a,


epsilon =
const double
2e-6
)
Comparison for doubles: returns fabs(a) < epsilon.

"Safe" comparison for floats/doubles: true if a is less than epsilon This function really doesn't make any sense
w.r.t. floating-point representation, so you should never use it. It is provided only for backwards
compatibility.

Deprecated:

Referenced by OBAtom::GetAngle(), OBMol::Has2D(), OBMol::Has3D(),


OBForceField::Newton2NumLineSearch(), OBForceField::VectorAngle(),
OBForceField::VectorAngleDerivative(), OBForceField::VectorOOP(),
OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and
OBForceField::VectorTorsionDerivative().

const
bool IsNan ( double a )
&
Comparison for nan (not a number).

Referenced by OBDescriptor::CompareStringWithFilter().

bool OpenBabel::IsNegligible ( const double & a,


const double & b,
precision =
const double
1e-11
) [inline]

Function Documentation 1521


Open Babel: API Documentation

Returns:
true if a is much smaller than b. More precisely:
return( fabs(a) <= precision * fabs(b) );

Referenced by vector3::createOrthoVector(), OBUnitCell::GetCellMatrix(), OBUnitCell::GetCellVectors(),


and matrix3x3::isDiagonal().

bool OpenBabel::IsApprox ( const double & a,


const double & b,
precision =
const double
1e-11
) [inline]
Safe comparison for floats/doubles: true if fabs(a - b) <= precision * std::min( fabs(a), fabs(b) ) The parameter
precision plays the role of 10^-N where N is the number of significant digits to consider. This is the correct
way to replace operator== for doubles. For new code, use this function instead of the old IsNear() function.

Note:
To check if x is zero, use
IsNegligible( x, 1.0)

instead of

IsApprox( x, 0.0 )

Referenced by CalcSignedVolume(), OBUnitCell::GetLatticeType(), matrix3x3::isSymmetric(),


matrix3x3::isUnitMatrix(), and OBMol::PerceiveBondOrders().

bool OpenBabel::IsApprox_pos ( const double & a,


const double & b,
precision =
const double
1e-11
) [inline]
Same as IsApprox(), but only for positive numbers. Faster.

const
bool CanBeSquared ( double a )
&
Tests whether its argument can be squared without triggering an overflow or underflow.

Tests whether its argument can be squared without triggering an overflow or underflow.

Referenced by vector3::CanBeNormalized().

bool SafeOpen ( std::ifstream & fs,


const char * filename

Function Documentation 1522


Open Babel: API Documentation

)
Safely open the supplied filename and return an ifstream, throwing an error to the default OBMessageHandler
error log if it fails.

Referenced by SafeOpen().

bool SafeOpen ( std::ofstream & fs,


const char * filename
)
Safely open the supplied filename and return an ofstream, throwing an error to the default OBMessageHandler
error log if it fails.

void OpenBabel::SmartsLexReplace ( std::string & ,


std::vector<
std::pair<
std::string,
std::string > > &
)

void DoubleMultiply ( unsigned int x,


unsigned int y,
DoubleType * z
)

Referenced by DeterminePotency(), GenerateSequence(), OBRandom::NextFloat(), and


OBRandom::NextInt().

void DoubleAdd ( DoubleType * x,


unsigned int y
)

Referenced by GenerateSequence(), OBRandom::NextFloat(), and OBRandom::NextInt().

unsigned int DoubleModulus ( DoubleType * n,


unsigned int d
)

Referenced by DeterminePotency(), GenerateSequence(), OBRandom::NextFloat(), and


OBRandom::NextInt().

bool CompareRingSize ( const OBRing * a,

Function Documentation 1523


Open Babel: API Documentation

const OBRing * b
)
Comparison function for rings, used by OBRingSearch::SortRings()

Returns:
true if a.size() > b.size()

Referenced by OBRingSearch::SortRings().

int Swab ( int i )


Swap Byte instruction (i.e., handle transfers between endian forms).

bool tokenize ( std::vector< std::string > & vcr,


const char * buf,
const char * delimstr
)
Break a string (supplied as the second argument) into tokens, returned in the first argument. Tokens are
determined by the delimiters supplied (defaults to whitespace (i.e., spaces, tabs, newlines)

Referenced by OBDescriptor::AddProperties(), patty::assign_rules(), OBDescriptor::DeleteProperties(),


DLHandler::findFiles(), OBDescriptor::GetValues(), OBBuilder::LoadFragments(),
OBAromaticTyper::ParseLine(), OBRingTyper::ParseLine(), OBAtomTyper::ParseLine(),
OBRotorRules::ParseLine(), OBPhModel::ParseLine(), OBResidueData::ParseLine(),
OBTypeTable::ParseLine(), OBIsotopeTable::ParseLine(), OBBondTyper::ParseLine(), and
patty::read_rules().

bool tokenize ( std::vector< std::string > & vcr,


std::string & s,
const char * delimstr,
int limit
)
Break a string (supplied as the second argument) into tokens, returned in the first argument. Tokens are
determined by the delimiters supplied (defaults to whitespace (i.e., spaces, tabs, newlines) Only breaks at most
'limit' tokens and the last item in the vector may include un-parsed tokens.

std::string & Trim ( std::string & txt )


Removes white space from front and back of string.

Referenced by OBMol::DoTransformations(), OBCommentData::SetData(), and OBMol::SetTitle().

std::string OpenDatafile ( std::ifstream & ifs,


const std::string & filename,

Function Documentation 1524


Open Babel: API Documentation

const std::string & envvar


)
Opens a datafile in a directory where OpenBabel expects to find it.

Opens the filestream with the first file called filename found by looking successively in the following
directories:

• the current directory


• in a subdirectory (of the directory below) with the version of OpenBabel as its name
• the parent directory specified by the environment variable named envvar or "BABEL_DATADIR"
if envvar is not specified, or the compiled-in macro BABEL_DATADIR if the environment
variable is not set

Parameters:
ifs Stream to load
filename Name of the data file to load
envvar Name of the environment variable

Returns:
the name of the file that was opened. This includes the path unless it is in current directory

Referenced by OBGlobalDataBase::Init(), OBBuilder::LoadFragments(), and


OBMoleculeFormat::ReadNameIndex().

vector3 OpenBabel::center_coords ( double * ,


int
)

ostream & operator<< ( std::ostream & co,


const vector3 & v
)
Prints a representation of the vector as a row vector of the form "<0.1,1,2>".

vector3 OpenBabel::operator+ ( const vector3 & v1,


const vector3 & v2
) [inline]
Vector addition.

vector3 OpenBabel::operator- ( const vector3 & v1,


const vector3 & v2
) [inline]
Vector subtraction.

Function Documentation 1525


Open Babel: API Documentation

vector3 OpenBabel::operator- ( const vector3 & v ) [inline]


Unary minus.

vector3 OpenBabel::operator* ( const double & c,


const vector3 & v
) [inline]
Multiplication with a scalar.

vector3 OpenBabel::operator* ( const vector3 & v,


const double & c
) [inline]
Multiplication with a scalar.

vector3 OpenBabel::operator/ ( const vector3 & v,


const double & c
) [inline]
Division by a scalar.

const
vector3 operator* ( matrix3x3 m,
&
const
v
vector3 &
)
Multiplication of matrix and vector.

Matrix-vector multiplication.

Calculates the product m*v of the matrix m and the column vector represented by v

double OpenBabel::dot ( const vector3 & v1,


const vector3 & v2
) [inline]
Dot product of two vectors.

Referenced by CalcTorsionAngle(), OBForceField::ConjugateGradientsTakeNSteps(), Point2Plane(),


OBForceField::ValidateConjugateGradients(), vectorAngle(), OBForceField::VectorAngleDerivative(),
OBForceField::VectorOOPDerivative(), and OBForceField::VectorTorsionDerivative().

vector3 cross ( const vector3 & v1,


const vector3 & v2

Function Documentation 1526


Open Babel: API Documentation

)
Cross product of two vectors.

Referenced by OBMol::Align(), CalcTorsionAngle(), OBBuilder::Connect(),


OBRing::findCenterAndNormal(), OBBuilder::GetNewBondVector(), OBAtom::GetNewBondVector(),
InternalToCartesian(), Point2Plane(), Point2PlaneAngle(), OBAtom::SetHybAndGeom(),
OBForceField::VectorAngleDerivative(), OBForceField::VectorOOPDerivative(), and
OBForceField::VectorTorsionDerivative().

double vectorAngle ( const vector3 & v1,


const vector3 & v2
)
Calculate the angle between vectors (in degrees).

This method calculates the angle between two vectors

Warning:
If length() of any of the two vectors is == 0.0, this method will divide by zero. If the product of the
length() of the two vectors is very close to 0.0, but not == 0.0, this method may behave in unexpected
ways and return almost random results; details may depend on your particular floating point
implementation. The use of this method is therefore highly discouraged, unless you are certain that
the length()es are in a reasonable range, away from 0.0 (Stefan Kebekus)

Deprecated:
This method will probably replaced by a safer algorithm in the future.

Todo:
Replace this method with a more fool-proof version.

Returns:
the angle in degrees (0-360)

Referenced by OBMol::Align(), OBAtom::AverageBondAngle(), CalcTorsionAngle(), CartesianToInternal(),


OBBuilder::Connect(), OBAtom::GetAngle(), Point2PlaneAngle(), OBUnitCell::SetData(),
OBAtom::SetHybAndGeom(), OBAtom::SmallestBondAngle(), and
OBForceField::VectorTorsionDerivative().

double CalcTorsionAngle ( const vector3 & a,


const vector3 & b,
const vector3 & c,
const vector3 & d
)
Calculate the torsion angle between vectors (in degrees).

This function calculates the torsion angle of three vectors, represented by four points A--B--C--D, i.e. B and C
are vertexes, but none of A--B, B--C, and C--D are colinear. A "torsion angle" is the amount of "twist" or
torsion needed around the B--C axis to bring A--B into the same plane as B--C--D. The torsion is measured by

Function Documentation 1527


Open Babel: API Documentation
"looking down" the vector B--C so that B is superimposed on C, then noting how far you'd have to rotate
A--B to superimpose A over D. Angles are + in theanticlockwise direction. The operation is symmetrical in
that if you reverse the image (look from C to B and rotate D over A), you get the same answer.

Referenced by OBRotamerList::AddRotamer(), BreakChiralTies(), CartesianToInternal(),


OBMol::GetTorsion(), OBBond::IsDoubleBondGeometry(), and match().

double Point2Plane ( vector3 a,


vector3 b,
vector3 c,
vector3 d
)
Calculate the distance of point a to the plane determined by b,c,d.

double Point2PlaneAngle ( const vector3 a,


const vector3 b,
const vector3 c,
const vector3 d
)
Calculate the angle between point a and the plane determined by b,c,d.

static void OpenBabel::ApplyRotMatToBond ( OBMol & mol,


matrix3x3
m,
&
OBAtom
a1,
*
OBAtom
a2
*
) [static]

Referenced by OBAtom::SetHybAndGeom().

OBBitVec OpenBabel::operator| ( const OBBitVec & bv1,


const OBBitVec & bv2
)
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

Function Documentation 1528


Open Babel: API Documentation

OBBitVec OpenBabel::operator & ( const OBBitVec & bv1,


const OBBitVec & bv2
)
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

OBBitVec OpenBabel::operator^ ( const OBBitVec & bv1,


const OBBitVec & bv2
)
Return a bit vector of the results of Exclusive-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

const
OBBitVec OpenBabel::operator- ( OBBitVec bv1,
&
const
OBBitVec bv2
&
)
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

const
bool OpenBabel::operator== ( OBBitVec bv1,
&
const bv2
OBBitVec

Function Documentation 1529


Open Babel: API Documentation

&
)
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

bool OpenBabel::operator< ( const OBBitVec & bv1,


const OBBitVec & bv2
)
Return true if bv1 i less than bv2 Lexicographical order, with bit vectors written LSB first.

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
true if equal, false otherwise

std::istream& OpenBabel::operator>> ( std::istream & is,


OBBitVec & bv
)
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

std::ostream& OpenBabel::operator<< ( std::ostream & os,


const OBBitVec & bv
)
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

Function Documentation 1530


Open Babel: API Documentation

static bool OpenBabel::CompareUnsigned ( const unsigned int & a,


const unsigned int & b
) [static]

Referenced by CreateNewClassVector().

static bool OpenBabel::ComparePairFirst ( const pair< OBAtom *, unsigned int > & a,
const pair< OBAtom *, unsigned int > & b
) [static]

Referenced by CanonicalLabels().

static bool OpenBabel::ComparePairSecond ( const pair< OBAtom *, unsigned int > & a,
const pair< OBAtom *, unsigned int > & b
) [static]

Referenced by BreakChiralTies(), and CountAndRenumberClasses().

static bool const pair< OBBond *, unsigned int >


( a,
OpenBabel::CompareBondPairSecond &
const pair< OBBond *, unsigned int >
b
&
) [static]

Referenced by FixCisTransBonds().

static unsigned int OpenBabel::GetValence ( OBAtom * atom,


OBBitVec & frag_atoms
) [static]

Referenced by BreakChiralTies(), and FixCisTransBonds().

static unsigned int OpenBabel::GetHvyValence ( OBAtom * atom,


OBBitVec & frag_atoms
) [static]

Referenced by GetGIVector().

static unsigned int OpenBabel::GetHvyBondSum ( OBAtom * atom,


OBBitVec & frag_atoms

Function Documentation 1531


Open Babel: API Documentation

) [static]

Referenced by GetGIVector().

static bool OpenBabel::GetGTDVector ( OBMol * pmol,


OBBitVec & frag_atoms,
vector< int > & gtd
) [static]

Referenced by GetGIVector().

static void OpenBabel::FindRingAtoms ( OBMol * pmol,


OBBitVec
frag_atoms,
&
OBBitVec
ring_atoms
&
) [static]

Referenced by GetGIVector().

static void OpenBabel::GetGIVector ( OBMol * pmol,


OBBitVec & frag_atoms,
vector< unsigned int > & vid
) [static]

Referenced by CalculateSymmetry().

vector< pair<
OBAtom *,
static void OpenBabel::CreateNewClassVector ( vp1,
unsigned int >
>&
vector< pair<
OBAtom *,
vp2,
unsigned int >
>&
OBBitVec & frag_atoms,
int natoms
) [static]

Referenced by CanonicalLabels(), ExtendInvarients(), and OBMol::GetGIDVector().

static void OpenBabel::CountAndRenumberClasses ( vp,

Function Documentation 1532


Open Babel: API Documentation

vector< pair<
OBAtom *,
unsigned int >
>&
unsigned int
count
&
) [static]

Referenced by CanonicalLabels(), and ExtendInvarients().

static int vector< pair< OBAtom *, unsigned


( symmetry_classes,
OpenBabel::ExtendInvarients int > > &
OBBitVec & frag_atoms,
int nfragatoms,
int natoms
) [static]

Referenced by BreakChiralTies(), and CalculateSymmetry().

static int
( OBMol * pmol,
OpenBabel::CalculateSymmetry
OBBitVec & frag_atoms,
vector< pair< OBAtom *,
symmetry_classes
unsigned int > > &
) [static]

Referenced by CanonicalLabels().

static void
( OBMol * pmol,
OpenBabel::BreakChiralTies
OBBitVec & frag_atoms,
int nfragatoms,
vector< pair< OBAtom *, unsigned
atom_sym_classes
int > > &
) [static]

Referenced by CanonicalLabels().

static void OpenBabel::FindConjugatedEZBonds ( OBAtom * atom,


OBBitVec & flip_bonds,
OBBitVec & visited_atoms
) [static]

Function Documentation 1533


Open Babel: API Documentation

Referenced by FixCisTransBonds().

static void OpenBabel::FixCisTransBonds ( OBMol * pmol,


OBBitVec & frag_atoms,
vector< unsigned int > & symmetry_classes,
vector< unsigned int > & canonical_labels
) [static]

Referenced by CanonicalLabels().

static ByteCode* OpenBabel::AllocateByteCode ( int type ) [static]

Referenced by GenerateByteCodes().

static void OpenBabel::DeleteByteCode ( ByteCode * node ) [static]


Free a ByteCode and all corresponding data.

Referenced by OBChainsParser::~OBChainsParser().

static void OpenBabel::FatalMemoryError ( void ) [static]

Referenced by GenerateByteCodes().

void OpenBabel::GenerateByteCodes ( ByteCode ** node,


int resid,
int curr,
int prev,
int bond
)

string
void OpenBabel::Toupper ( s )
&

string
void OpenBabel::Tolower ( s )
&

void OpenBabel::Reweight ( std::vector< std::vector< double > > & rotorWeights,


std::vector< int > rotorKey,
double bonus

Function Documentation 1534


Open Babel: API Documentation

Referenced by OBForceField::WeightedRotorSearch().

ostream& OpenBabel::operator<< ( std::ostream & os,


const OBFloatGrid & fg
)

std::istream
istream& OpenBabel::operator>> ( is,
&
OBFloatGrid
fg
&
)

bool OpenBabel::SortVVInt ( const vector< int > & a,


const vector< int > & b
)

Referenced by OBMol::ContigFragList().

bool OpenBabel::SortAtomZ ( const pair< OBAtom *, double > & a,


const pair< OBAtom *, double > & b
)

Referenced by OBMol::ConnectTheDots(), and OBMol::PerceiveBondOrders().

static bool OpenBabel::OBComparePairSecond ( const pair< OBAtom *, unsigned int > & a,
const pair< OBAtom *, unsigned int > & b
) [static]

Referenced by ClassCount().

static bool OpenBabel::OBComparePairFirst ( const pair< OBAtom *, unsigned int > & a,
const pair< OBAtom *, unsigned int > & b
) [static]

Referenced by CreateNewClassVector(), and OBMol::GetGIDVector().

static void OpenBabel::ClassCount ( vector< pair< OBAtom *, unsigned int > > & vp,

Function Documentation 1535


Open Babel: API Documentation

unsigned int & count


) [static]
counts the number of unique symmetry classes in a list

Referenced by OBMol::GetGIDVector().

vector< pair<
OBAtom *,
static void OpenBabel::CreateNewClassVector ( vp1,
unsigned int > >
&
vector< pair<
OBAtom *,
vp2
unsigned int > >
&
) [static]
creates a new vector of symmetry classes base on an existing vector helper routine to GetGIDVector

static int OpenBabel::ValenceSum ( OBAtom * atom ) [static]

Referenced by KekulePropagate().

OBAtom
static bool OpenBabel::KekulePropagate ( atom,
*
vector<
visit,
int > &
vector<
ival,
int > &
int depth
) [static]

int OpenBabel::GetCurrentValence ( OBAtom * atom )

Referenced by ExpandKekule().

bool OpenBabel::ExpandKekule ( OBMol & mol,


vector< OBAtom * > & va,
vector< OBAtom * >::iterator i,
vector< int > & maxv,
bool secondpass
)

Referenced by OBMol::PerceiveKekuleBonds().

Function Documentation 1536


Open Babel: API Documentation

OBMol
void OpenBabel::CorrectBadResonanceForm ( mol )
&

Referenced by OBMol::PerceiveKekuleBonds().

ostream
bool OpenBabel::WriteTitles ( ofs,
&
OBMol
mol
&
)

vector3 OpenBabel::center_coords ( double * c,


unsigned int size
)

Returns:
the geometric centroid to an array of coordinates in double* format and center the coordinates to the
origin. Operates on the first "size" coordinates in the array.

void OpenBabel::rotate_coords ( double * c,


double m[3][3],
unsigned
size
int
)
Rotates the coordinate set *c by the transformation matrix m[3][3] Operates on the first "size" coordinates in
the array.

void OpenBabel::SetRotorToAngle ( double * c,


vector< int > & tor,
double ang,
vector< int > & atoms
)
Rotate the coordinates of 'atoms' such that tor == ang - atoms in 'tor' should be ordered such that the 3rd atom
is the pivot around which atoms rotate

Referenced by OBRotamerList::CreateConformerList(), and OBRotamerList::SetCurrentCoordinates().

bool OpenBabel::SafeOpen ( std::ifstream & fs,


const string & filename
)
Safely open the supplied filename and return an ifstream, throwing an error to the default OBMessageHandler
error log if it fails.

Function Documentation 1537


Open Babel: API Documentation

std::ofstream
bool OpenBabel::SafeOpen ( fs,
&
const string
filename
&
)
Safely open the supplied filename and return an ofstream, throwing an error to the default OBMessageHandler
error log if it fails.

void OpenBabel::InvertCase ( std::string & s,


unsigned int start
)
Shift the supplied string: lowercase to upper, and upper to lower

Parameters:
s - The string to switch case
start - The position to start
inverting case

int OpenBabel::SolveLinear ( double A,


double B
)

Referenced by SolveQuadratic().

int OpenBabel::SolveQuadratic ( double A,


double B,
double C
)

Referenced by SolveCubic().

double OpenBabel::CubeRoot ( double X )

Referenced by SolveCubic().

int OpenBabel::SolveCubic ( double A,


double B,
double C,
double D
)

Function Documentation 1538


Open Babel: API Documentation

static int OpenBabel::get_roots_3_3 ( double mat[3][3],


double roots[3]
) [static]

Referenced by get_rmat(), and superimpose().

OpCenter OpenBabel::theOpCenter ( "center" )

static bool match ( OBMol & mol,


Pattern * pat,
std::vector< std::vector< int > > & mlist,
bool single = false
) [static]

Referenced by patty::assign_types(), EvalAtomExpr(), OBSmartsPattern::Match(), and


OBSmartsPattern::RestrictedMatch().

static bool EvalAtomExpr ( AtomExpr * expr,


OBAtom * atom
) [static]

Referenced by FastSingleMatch(), OBSSMatch::Match(), and SetupAtomMatchTable().

static bool EvalBondExpr ( BondExpr * expr,


OBBond * bond
) [static]

Referenced by FastSingleMatch(), and OBSSMatch::Match().

static int GetVectorBinding ( ) [static]

Referenced by SMARTSParser().

static int CreateAtom ( Pattern * pat,


AtomExpr * expr,
int part,
int vb = 0
) [static]

Referenced by CopyPattern(), and SMARTSParser().

Function Documentation 1539


Open Babel: API Documentation

static void OpenBabel::FatalAllocationError ( const char * ptr ) [static]

Referenced by AllocPattern(), CreateAtom(), and CreateBond().

static void FreePattern ( Pattern * pat ) [static]

Referenced by ConstrainRecursion(), FreeAtomExpr(), ParseComplexAtomPrimitive(), SMARTSError(), and


OBSmartsPattern::~OBSmartsPattern().

static Pattern * CopyPattern ( Pattern * pat ) [static]

Referenced by CopyAtomExpr().

static AtomExpr* OpenBabel::AllocAtomExpr ( void ) [static]

Referenced by BuildAtomBin(), BuildAtomLeaf(), BuildAtomNot(), BuildAtomRecurs(), and


CopyAtomExpr().

static AtomExpr* OpenBabel::CopyAtomExpr ( AtomExpr * expr ) [static]

Referenced by AndAtomExpr(), and CopyPattern().

static void OpenBabel::FreeAtomExpr ( AtomExpr * expr ) [static]

Referenced by AndAtomExpr(), AndAtomExprLeaf(), AtomExprImplies(), FreePattern(), NotAtomExpr(),


OrAtomExpr(), and ParseAtomExpr().

static AtomExpr* OpenBabel::BuildAtomLeaf ( int prop,


int val
) [static]

Referenced by AndAtomExprLeaf(), ConstrainRecursion(), GenerateAromElem(), GenerateElement(),


ParseComplexAtomPrimitive(), and ParseSimpleAtomPrimitive().

static AtomExpr* OpenBabel::BuildAtomNot ( AtomExpr * expr ) [static]

Referenced by NotAtomExpr(), and ParseAtomExpr().

static AtomExpr* OpenBabel::BuildAtomBin ( int op,


AtomExpr * lft,

Function Documentation 1540


Open Babel: API Documentation

AtomExpr * rgt
) [static]

Referenced by AndAtomExprLeaf(), GenerateAromElem(), OrAtomExprLeaf(), and ParseAtomExpr().

static AtomExpr* OpenBabel::BuildAtomRecurs ( Pattern * pat ) [static]

Referenced by ParseComplexAtomPrimitive().

static AtomExpr* OpenBabel::GenerateElement ( int elem ) [static]

Referenced by ParseComplexAtomPrimitive(), ParseSimpleAtomPrimitive(), and SMARTSParser().

static AtomExpr* OpenBabel::GenerateAromElem ( int elem,


int flag
) [static]

Referenced by ParseComplexAtomPrimitive(), and ParseSimpleAtomPrimitive().

static int OpenBabel::IsInvalidAtom ( AtomExpr * expr ) [static]

Referenced by ConstrainRecursion().

static BondExpr* OpenBabel::AllocBondExpr ( void ) [static]

Referenced by BuildBondBin(), BuildBondLeaf(), BuildBondNot(), and CopyBondExpr().

static BondExpr* OpenBabel::CopyBondExpr ( BondExpr * expr ) [static]

Referenced by CopyPattern().

static bool OpenBabel::EquivalentBondExpr ( BondExpr * expr1,


BondExpr * expr2
) [static]

Referenced by SMARTSParser().

static void OpenBabel::FreeBondExpr ( BondExpr * expr ) [static]

Function Documentation 1541


Open Babel: API Documentation

Referenced by FreePattern(), ParseBondExpr(), ParseSMARTSError(), ParseSMARTSPart(), and


SMARTSParser().

static BondExpr* OpenBabel::BuildBondLeaf ( int prop,


int val
) [static]

Referenced by GenerateDefaultBond(), and ParseBondPrimitive().

static BondExpr* OpenBabel::BuildBondNot ( BondExpr * expr ) [static]

Referenced by ParseBondExpr().

static BondExpr* OpenBabel::BuildBondBin ( int op,


BondExpr * lft,
BondExpr * rgt
) [static]

Referenced by GenerateDefaultBond(), and ParseBondExpr().

static BondExpr* OpenBabel::GenerateDefaultBond ( void ) [static]

Referenced by SMARTSParser().

static Pattern* OpenBabel::AllocPattern ( void ) [static]

Referenced by CopyPattern(), and ParseSMARTSPattern().

static int OpenBabel::CreateBond ( Pattern * pat,


BondExpr * expr,
int src,
int dst
) [static]

Referenced by CopyPattern(), and SMARTSParser().

static Pattern * ParseSMARTSPattern ( void ) [static]

Referenced by ParseComplexAtomPrimitive(), and ParseSMARTSString().

Function Documentation 1542


Open Babel: API Documentation

static Pattern * ParseSMARTSPart ( Pattern * result,


int part
) [static]

Referenced by ParseSMARTSPattern().

static Pattern* OpenBabel::SMARTSError ( Pattern * pat ) [static]

Referenced by ParseSMARTSError(), ParseSMARTSPart(), ParseSMARTSPattern(), and


ParseSMARTSString().

static AtomExpr* OpenBabel::ParseSimpleAtomPrimitive ( void ) [static]

Referenced by SMARTSParser().

static AtomExpr* OpenBabel::ParseComplexAtomPrimitive ( void ) [static]

Referenced by ParseAtomExpr().

static AtomExpr* OpenBabel::ParseAtomExpr ( int level ) [static]

Referenced by SMARTSParser().

static BondExpr* OpenBabel::ParseBondPrimitive ( void ) [static]

Referenced by ParseBondExpr().

static BondExpr* OpenBabel::ParseBondExpr ( int level ) [static]

Referenced by SMARTSParser().

static Pattern* OpenBabel::ParseSMARTSError ( Pattern * pat,


BondExpr * expr
) [static]

Referenced by SMARTSParser().

static Pattern* OpenBabel::SMARTSParser ( Pattern * pat,


ParseState * stat,

Function Documentation 1543


Open Babel: API Documentation

int prev,
int part
) [static]

Referenced by ParseSMARTSPart().

static void OpenBabel::MarkGrowBonds ( Pattern * pat ) [static]

Referenced by ParseSMARTSPart().

static int OpenBabel::GetChiralFlag ( AtomExpr * expr ) [static]

Referenced by ParseSMARTSPart().

static Pattern* OpenBabel::ParseSMARTSString ( char * ptr ) [static]

Referenced by ParseSMARTSRecord().

Pattern* OpenBabel::ParseSMARTSRecord ( char * ptr )

Referenced by OBSmartsPattern::Init().

static void OpenBabel::TraverseSMARTS ( Pattern * pat,


int i
) [static]

static AtomExpr * NotAtomExpr ( AtomExpr * expr ) [static]

static AtomExpr * AndAtomExpr ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by ConstrainRecursion(), and NotAtomExpr().

static AtomExpr * OrAtomExpr ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExpr(), and NotAtomExpr().

Function Documentation 1544


Open Babel: API Documentation

static int OpenBabel::IsBooleanAtomLeaf ( AtomExpr * expr ) [static]

Referenced by NotAtomExpr().

static int OpenBabel::IsNegatingAtomLeaf ( AtomExpr * expr ) [static]

Referenced by AtomLeafConflict(), and NotAtomExpr().

static int OpenBabel::EqualAtomExpr ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExpr(), and OrAtomExpr().

static int OpenBabel::OrderAtomExpr ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExpr(), and OrAtomExpr().

static int OpenBabel::AtomLeafConflict ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AtomExprConflict().

static int OpenBabel::AtomExprConflict ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExprLeaf().

static int OpenBabel::AtomLeafImplies ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AtomExprImplied(), and AtomExprImplies().

static int OpenBabel::AtomExprImplied ( AtomExpr * lft,


AtomExpr * rgt

Function Documentation 1545


Open Babel: API Documentation

) [static]

Referenced by AndAtomExprLeaf().

static AtomExpr* OpenBabel::AtomExprImplies ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExprLeaf().

static AtomExpr* OpenBabel::AndAtomExprLeaf ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by AndAtomExpr().

static AtomExpr* OpenBabel::ConstrainRecursion ( AtomExpr * recur,


AtomExpr * expr
) [static]

Referenced by AndAtomExpr().

static AtomExpr* OpenBabel::OrAtomExprLeaf ( AtomExpr * lft,


AtomExpr * rgt
) [static]

Referenced by OrAtomExpr().

static int OpenBabel::GetBondLeafIndex ( BondExpr * expr ) [static]

Referenced by GetBondExprIndex().

static int OpenBabel::GetBondExprIndex ( BondExpr * expr ) [static]

std::vector<
void OpenBabel::SetupAtomMatchTable ( std::vector< bool ttab,
>>&
Pattern * pat,
OBMol & mol
)

Function Documentation 1546


Open Babel: API Documentation

static void OpenBabel::FastSingleMatch ( OBMol & mol,


Pattern * pat,
std::vector<
std::vector< int > mlist
>&
) [static]

Referenced by match().

static int OpenBabel::GetExprOrder ( BondExpr * expr ) [static]

Referenced by OBSmartsPattern::GetBond().

void OpenBabel::SmartsLexReplace ( std::string & s,


std::vector<
std::pair<
vlex
std::string,
std::string > > &
)

static unsigned int OpenBabel::isqrt ( unsigned int val ) [static]

Referenced by IsOddPrime().

static int OpenBabel::IsOddPrime ( unsigned int x ) [static]

Referenced by DetermineFactors().

static int OpenBabel::RelativelyPrime ( unsigned int x,


unsigned int y
) [static]

Referenced by DetermineIncrement().

static int OpenBabel::LeadingZeros ( unsigned int x ) [static]

Referenced by DoubleModulus().

unsigned
static int OpenBabel::DeterminePotency ( m,
int

Function Documentation 1547


Open Babel: API Documentation

unsigned
a
int
) [static]

Referenced by DetermineSequence().

static int OpenBabel::DetermineFactors ( unsigned int x,


unsigned int * factors
) [static]

Referenced by DetermineSequence().

static unsigned int OpenBabel::DetermineIncrement ( unsigned int m ) [static]

Referenced by DetermineSequence().

int OpenBabel::DetermineSequence ( unsigned int m,


unsigned int * pm,
unsigned int * pa,
unsigned int * pc
)

Referenced by OBRandom::OBRandom().

void OpenBabel::GenerateSequence ( unsigned int p,


unsigned int m,
unsigned int a,
unsigned int c
)

static unsigned int OpenBabel::GetAtomIDNumber ( const char * atomid ) [static]

Referenced by OBResidue::GetAtomProperty().

static unsigned int OpenBabel::GetResidueNumber ( const char * res ) [static]

Referenced by SetResidueKeys().

static void OpenBabel::SetResidueKeys ( const char * residue,

Function Documentation 1548


Open Babel: API Documentation

unsigned int & reskey,


unsigned int & aakey
) [static]

Referenced by OBResidue::SetName().

static int DetermineFRJ ( OBMol & mol ) [static]

Referenced by OBMol::FindSSSR().

void BuildOBRTreeVector ( OBAtom * atom,


OBRTree * prv,
vector< OBRTree * > & vt,
OBBitVec & bv
) [static]

Referenced by OBRingSearch::AddRingFromClosure().

static void FindRings ( OBMol & mol,


vector< int > & path,
OBBitVec & avisit,
OBBitVec & bvisit,
int natom,
int depth
) [static]

Referenced by OBMol::FindRingAtomsAndBonds().

double OpenBabel::rint ( double x ) [inline]

Referenced by OBRotamerList::AddRotamer().

void SetRotorToAngle ( double * c,


OBAtom ** ref,
double ang,
vector< int > atoms
)
Rotate the coordinates of 'atoms' such that tor == ang. Atoms in 'tor' should be ordered such that the 3rd atom
is the pivot around which atoms rotate (ang is in degrees)

Todo:

Function Documentation 1549


Open Babel: API Documentation
This code is identical to OBMol::SetTorsion() and should be combined

int OpenBabel::PackCoordinate ( double c[3],


double max[3]
)

void OpenBabel::UnpackCoordinate ( double c[3],


double max[3],
int tmp
)

bool GetDFFVector ( OBMol & mol,


vector< int > & dffv,
OBBitVec & bv
) [static]

Referenced by OBRotorList::SetRotAtomsByFix().

bool CompareRotor ( const pair< OBBond *, int > & a,


const pair< OBBond *, int > & b
) [static]

Referenced by OBRotorList::FindRotors().

static double MinimumPairRMS ( OBMol & mol,


double * a,
double * b,
bool & one2one
) [static]

Referenced by OBRotorList::RemoveSymVals().

char* OpenBabel::trim_spaces ( char * string )


Trim any trailing spaces at the end of the supplied string.

matrix3x3 OpenBabel::operator* ( const matrix3x3 & A,


const matrix3x3 & B
)

Function Documentation 1550


Open Babel: API Documentation

static double OpenBabel::SQUARE ( double x ) [inline, static]

Referenced by calc_rms(), OBRotor::CalcBondLength(), OBRotor::CalcTorsion(),


OBMol::ConnectTheDots(), matrix3x3::FillOrth(), OBUnitCell::GetCellVolume(),
OBUnitCell::GetFractionalMatrix(), OBBond::GetLength(), MinimumPairRMS(), OBRotor::Precompute(),
OBRotor::SetRotor(), SetRotorToAngle(), OBRotor::SetToAngle(), OBMol::SetTorsion(), and
OBProxGrid::Setup().

std::ostream
ostream& OpenBabel::operator<< ( co,
&
const
m
matrix3x3 &
)
Print a text representation of the matrix in the standardized form: [ a, b, c ]
[ d, e, f ]
[ g, h, i ]
where the letters represent the appropriate entries in the matrix. Uses the standard output format for the
individual entries, separated by ", " for each column, and [ ] indicating each row.

const vector3 OpenBabel::VZero ( 0. 0,


0. 0,
0. 0
)

Referenced by CalcSignedVolume().

const vector3 OpenBabel::VX ( 1. 0,


0. 0,
0. 0
)

const vector3 OpenBabel::VY ( 0. 0,


1. 0,
0. 0
)

const vector3 OpenBabel::VZ ( 0. 0,


0. 0,
1. 0
)

Function Documentation 1551


Open Babel: API Documentation

Variable Documentation

const unsigned int AliasDataType = 0x7883

const unsigned RateData = 55555

const unsigned ThermoData = 55556

Referenced by OBNasaThermoData::OBNasaThermoData().

OBLocale obLocale
Global OBLocale for setting and restoring locale information.

Referenced by OBGlobalDataBase::Init(), OBBuilder::LoadFragments(), OBConversion::Read(), and


OBConversion::Write().

OBElementTable etab
Global OBElementTable for element properties.

Referenced by OBMol::AddHydrogens(), CalculateSymmetry(), OBMol::ConnectTheDots(),


AliasData::Expand(), OBAtom::GetAtomicMass(), OBBond::GetEquibLength(), OBMol::GetMolWt(),
OBMol::GetSpacedFormula(), OBAtom::HtoMethyl(), OBMol::PerceiveBondOrders(), and
OBAtom::SetHybAndGeom().

OBTypeTable ttab
Global OBTypeTable for translating between different atom types (e.g., Sybyl <-> MM2)

Referenced by OBAtom::GetType(), and SetupAtomMatchTable().

OBIsotopeTable isotab
Global OBIsotopeTable for isotope properties.

Referenced by OBAtom::GetAtomicMass(), OBMol::GetExactMass(), and OBAtom::GetExactMass().

OBAromaticTyper aromtyper
Global OBAromaticTyper for detecting aromatic atoms and bonds.

Referenced by OBAtomTyper::AssignHyb(), OBBond::IsAromatic(), OBAtom::IsAromatic(),


OBBond::IsDouble(), OBBond::IsSingle(), and OBBond::IsTriple().

Variable Documentation 1552


Open Babel: API Documentation

OBAtomTyper atomtyper
Global OBAtomTyper for marking internal valence, hybridization, and atom types (for internal and external
use)

Referenced by OBPhModel::CorrectForPH(), OBAtom::GetHyb(), OBAtom::GetImplicitValence(),


OBAtom::GetType(), and OBAtom::ImplicitHydrogenCount().

OBChainsParser chainsparser
Global OBChainsParser for detecting macromolecular chains and residues.

Referenced by OBAtom::GetResidue().

OBMessageHandler obErrorLog
Global OBMessageHandler error handler.

Referenced by FastSearchIndexer::Add(), OBChiralData::AddAtomRef(), OBMol::AddBond(),


OBConversion::AddChemObject(), OBMol::AddHydrogens(), OBDescriptor::AddProperties(),
OBMol::Align(), AllocateByteCode(), OBChemTsfm::Apply(), patty::assign_types(),
OBAromaticTyper::AssignAromaticFlags(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBGastChrg::AssignPartialCharges(),
OBMol::AssignSpinMultiplicity(), OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(),
CalcSignedVolume(), CartesianToInternal(), OBMol::Center(), OBConversion::CheckForUnintendedBatch(),
FptIndex::CheckFP(), OBMol::Clear(), OBDescriptor::Compare(),
OBDescriptor::CompareStringWithFilter(), OBMol::ConnectTheDots(), OBConversion::Convert(),
OBMol::ConvertDativeBonds(), CorrectBadResonanceForm(), OBPhModel::CorrectForPH(),
OBMol::CorrectForPH(), OBMoleculeFormat::DeferMolOutput(), OBMol::DeleteHydrogens(),
OBMol::DeleteNonPolarHydrogens(), OBMol::DoTransformations(), OBMol::EndModify(),
OBMol::expand_kekulize(), FatalAllocationError(), FatalMemoryError(), OBDescriptor::FilterCompare(),
SpaceGroup::Find(), FastSearch::Find(), OBMol::FindChiralCenters(), OBMol::FindRingAtomsAndBonds(),
OBRotorList::FindRotors(), OBMol::FindSSSR(), OBFingerprint::Fold(), OBBitVec::FromString(),
OBConversion::FullConvert(), GenerateByteCodes(), OBMol::GetAtom(), OBChiralData::GetAtom4Refs(),
GetAtomIDNumber(), OBChiralData::GetAtomRef(), OBMol::GetBond(), OBMol::GetFormula(),
OBMol::GetResidue(), OBRotorRules::GetRotorIncrements(), OBChiralData::GetSize(),
OBMol::GetTotalCharge(), OBMol::GetTotalSpinMultiplicity(), OBDescriptor::GetValues(),
OBAtom::HtoMethyl(), OBGlobalDataBase::Init(), InternalToCartesian(), OBBond::IsClosure(),
OBMol::Kekulize(), OBConversion::LoadFormatFiles(), OBBuilder::LoadFragments(),
OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewPerceiveKekuleBonds(),
OBConversion::OpenAndSetFormat(), OBConversion::OpenInAndOutFiles(), operator>>(),
OBMoleculeFormat::OutputDeferredMols(), OBAromaticTyper::ParseLine(), OBRingTyper::ParseLine(),
OBAtomTyper::ParseLine(), OBRotorRules::ParseLine(), OBPhModel::ParseLine(),
OBTypeTable::ParseLine(), OBIsotopeTable::ParseLine(), OBBondTyper::ParseLine(),
OBMol::PerceiveBondOrders(), OBChainsParser::PerceiveChains(), patty::read_rules(),
OBMoleculeFormat::ReadChemObjectImpl(), OBConversion::ReadFile(),
OBMoleculeFormat::ReadNameIndex(), OBDescriptor::ReadStringFromFilter(),
OBConversion::RegisterOptionParam(), OBRotorList::RemoveSymVals(), OBMol::RenumberAtoms(),
OBMol::Rotate(), SafeOpen(), OBChiralData::SetAtom4Refs(), OBTypeTable::SetFromType(),
OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBMol::SetTorsion(), OBTypeTable::SetToType(),
OBRotorList::Setup(), SMARTSError(), OBMol::start_kekulize(), OBMol::StripSalts(), obLogBuf::sync(),

Variable Documentation 1553


Open Babel: API Documentation

ThrowError(), OBMol::ToInertialFrame(), OBMol::Translate(), OBTypeTable::Translate(),


patty::type_to_int(), OBMoleculeFormat::WriteChemObjectImpl(), OBConversion::WriteFile(), and
FastSearchIndexer::~FastSearchIndexer().

OBResidueData resdat
Global OBResidueData biomolecule residue database.

char Residue

Referenced by GetResidueNumber().

char ElemDesc

Referenced by GetAtomIDNumber().

unsigned int ResNo = MINRES

Referenced by GetResidueNumber().

unsigned int ElemNo = MINELEM

Referenced by GetAtomIDNumber().

const vector3 VZero(0.0, 0.0, 0.0)


The zero vector: <0.0, 0.0, 0.0>.

Referenced by OBScoreGrid::Center(), center_coords(), OBScoreGrid::CenterMol(),


OBFFConstraint::GetGradient(), OBBuilder::GetNewBondVector(), OBAtom::GetNewBondVector(),
OBMol::HasNonZeroCoords(), OBForceField::LineSearch(), OBForceField::VectorAngleDerivative(),
OBForceField::VectorOOPDerivative(), and OBForceField::VectorTorsionDerivative().

const vector3 VX(1.0, 0.0, 0.0)


The x unit vector: <1.0, 0.0, 0.0>.

Referenced by OBBuilder::Build(), OBBuilder::GetNewBondVector(), and OBAtom::GetNewBondVector().

const vector3 VY(0.0, 1.0, 0.0)


The y unit vector: <0.0, 1.0, 0.0>.

Referenced by OBBuilder::GetNewBondVector(), OBAtom::GetNewBondVector(), and


InternalToCartesian().

Variable Documentation 1554


Open Babel: API Documentation

const vector3 VZ(0.0, 0.0, 1.0)


The z unit vector: <0.0, 0.0, 1.0>.

OBPhModel phmodel

Referenced by OBMol::CorrectForPH(), and OBAtom::GetPartialCharge().

int bitsoff[SETWORD] [static]


Initial value:
{
0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFC,0xFFFFFFF8,0xFFFFFFF0,0xFFFFFFE0,0xFFFFFFC0,
0xFFFFFF80,0xFFFFFF00,0xFFFFFE00,0xFFFFFC00,0xFFFFF800,0xFFFFF000,0xFFFFE000,
0xFFFFC000,0xFFFF8000,0xFFFF0000,0xFFFE0000,0xFFFC0000,0xFFF80000,0xFFF00000,
0xFFE00000,0xFFC00000,0xFF800000,0xFF000000,0xFE000000,0xFC000000,0xF8000000,
0xF0000000,0xE0000000,0xC0000000,0x80000000
}

Referenced by OBBitVec::NextBit().

const unsigned nibble_bit_count[0x10]


Initial value:
{
0,
1,
1,
2,
1,
2,
2,
3,
1,
2,
2,
3,
2,
3,
3,
4
}

Referenced by OBBitVec::CountBits().

OBBondTyper bondtyper
Global OBBondTyper for perception of bond order assignment.

Referenced by OBMol::PerceiveBondOrders().

Template Peptide[MAXPEPTIDE] [static]


Initial value:

Variable Documentation 1555


Open Babel: API Documentation
{
{ 0x0001, 7, 2, 0x0030, 0x0100, 0, 0 },
{ 0x0002, 7, 1, 0x0030, 0, 0, 0 },
{ 0x0004, 7, 3, 0x0030, 0x0100, -6, 0 },
{ 0x0008, 7, 2, 0x0030, -6, 0, 0 },
{ 0x0010, 6, 3, 0x000F, 0x0700, -6, 0 },
{ 0x0020, 6, 2, 0x0003, 0x0700, 0, 0 },
{ 0x0100, 6, 3, 0x0030, 0x1000, 0x0005, 0 },
{ 0x0200, 6, 2, 0x0030, 0x1000, 0, 0 },
{ 0x0400, 6, 3, 0x0030, 0x1000, 0x2000, 0 },
{ 0x1000, 8, 1, 0x0700, 0, 0, 0 },
{ 0x2000, 8, 1, 0x0400, 0, 0, 0 }
}

Generic template for peptide residue backbone.

Template Nucleotide[MAXNUCLEIC] [static]


Initial value:
{
{ 0x0001, 15, 4, 0x0004, 0x0004, 0x0008, 0x0200 },
{ 0x0002, 15, 3, 0x0004, 0x0004, 0x0008, 0 },
{ 0x0004, 8, 1, 0x0003, 0, 0, 0 },
{ 0x0008, 8, 2, 0x0020, 0x0003, 0, 0 },
{ 0x0010, 8, 1, 0x0020, 0, 0, 0 },
{ 0x0020, 6, 2, 0x0018, 0x0040, 0, 0 },
{ 0x0040, 6, 3, 0x0020, 0x0080, 0x0100, 0 },
{ 0x0080, 8, 2, 0x0040, 0x4000, 0, 0 },
{ 0x0100, 6, 3, 0x0040, 0x0600, 0x1800, 0 },
{ 0x0200, 8, 2, 0x0100, 0x0001, 0, 0 },
{ 0x0400, 8, 1, 0x0100, 0, 0, 0 },
{ 0x0800, 6, 3, 0x0100, 0x4000, 0x2000, 0 },
{ 0x1000, 6, 2, 0x0100, 0x4000, 0, 0 },
{ 0x2000, 8, 1, 0x0800, 0, 0, 0 },
{ 0x4000, 6, 3, 0x0080, 0x1800, -7, 0 }
}

Generic template for peptide nucleotide backbone.

char ChainsAtomName[ATOMMAX][4] [static]


PDB atom types (i.e., columns 13-16 of a PDB file) index numbers from this array are used in the
pseudo-SMILES format for side-chains in the AminoAcids[] & Nucleotides[] global arrays below

ResidType AminoAcids[AMINOMAX] [static]


Initial value:
{
{ "ILE", "1-4(-9-14)-10" },
{ "VAL", "1-4(-9)-10" },
{ "ALA", "1-4" },
{ "ASN", "1-4-7(=15)-19" },
{ "ASP", "1-4-7(=15)-18" },
{ "ARG", "1-4-7-11-21-29(=34)-35" },
{ "CYS", "1-4-5" },
{ "GLN", "1-4-7-11(=23)-27" },
{ "GLU", "1-4-7-11(=23)-26" },

Variable Documentation 1556


Open Babel: API Documentation
{ "GLY", "1" },
{ "HIS", "1-4-7^16~22^27^17~7" },
{ "HYP", "1-4-7(-12)-11-0" },
{ "LEU", "1-4-7(-14)-17" },
{ "LYS", "1-4-7-11-20-30" },
{ "MET", "1-4-7-13-20" },
{ "PHE", "1-4-7~14^22~29^25~17^7" },
{ "PRO", "1-4-7-11-0" },
{ "SER", "1-4-6" },
{ "THR", "1-4(-8)-10" },
{ "TRP", "1-4-7~14^24^25~17(^7)^28~32^36~31^25" },
{ "TYR", "1-4-7~14^22~29(-33)^25~17^7" }
}

Side chains for recognized amino acids using a pseudo-SMARTS syntax for branching and bonds. Numbers
indicate atom types defined by ChainsAtomName global array above

Referenced by OBChainsParser::OBChainsParser().

ResidType Nucleotides[NUCLEOMAX] [static]


Initial value:
{
{ " A", "49-50-51-52-53-54(-56)-57-58-61-62(-53)-50" },
{ " C", "49-57-58(-59)-61-62(-64)-65-67-57" },
{ " G", "49-50-51-52-53-54(-55)-57-58(-60)-61-62(-53)-50" },
{ " T", "49-57-58(-59)-61-62(-63)-65(-66)-67-57" },
{ " U", "49-57-58(-59)-61-62(-63)-65-67-57" },
{ " I", "49-50-51-52-53-54(-55)-57-58-61-62(-53)-50" }
}

Side chains for recognized nucleotides using a pseudo-SMARTS syntax for branching and bonds. Numbers
indicate atom types defined by ChainsAtomName global array above

Referenced by OBChainsParser::OBChainsParser().

MonoAtomType MonoAtom[MaxMonoAtom] [static]

Referenced by GenerateByteCodes().

MonoBondType MonoBond[MaxMonoBond] [static]

Referenced by GenerateByteCodes().

int MonoAtomCount [static]

Referenced by GenerateByteCodes().

int MonoBondCount [static]

Variable Documentation 1557


Open Babel: API Documentation

Referenced by GenerateByteCodes().

StackType Stack[STACKSIZE] [static]

Referenced by GenerateByteCodes().

int StackPtr [static]

Referenced by GenerateByteCodes().

int AtomIndex [static]

Referenced by GenerateByteCodes().

int BondIndex [static]

Referenced by GenerateByteCodes().

bool StrictFlag = false [static]

Referenced by GenerateByteCodes().

const bool SwabInt = (STPTR[0]!=0)

double Roots[4] [static]

Referenced by get_roots_3_3(), SolveCubic(), SolveLinear(), and SolveQuadratic().

std::vector<std::pair<Pattern*,std::vector<bool> > > RSCACHE

Referenced by EvalAtomExpr(), OBSmartsPattern::Match(), and OBSmartsPattern::RestrictedMatch().

char* MainPtr [static]

Referenced by ParseSMARTSString(), and SMARTSError().

char* LexPtr [static]

Variable Documentation 1558


Open Babel: API Documentation

Referenced by GetVectorBinding(), ParseAtomExpr(), ParseBondExpr(), ParseBondPrimitive(),


ParseComplexAtomPrimitive(), ParseSimpleAtomPrimitive(), ParseSMARTSPattern(),
ParseSMARTSString(), SMARTSError(), and SMARTSParser().

char Buffer[BUFF_SIZE] [static]

Referenced by OBSmartsPattern::Init(), and ParseSMARTSRecord().

char Descr[BUFF_SIZE] [static]

Referenced by ParseSMARTSRecord(), and SolveQuadratic().

POINT_GROUP PointGroups[]

int primes[MAXPRIMES] [static]


Initial value:
{
1, 2, 3, 5, 7, 11, 13, 17, 19, 23,
29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
71, 73, 79, 83, 89, 97, 101, 103, 107, 109,
113, 127, 131, 137, 139, 149, 151, 157, 163, 167,
173, 179, 181, 191, 193, 197, 199, 211, 223, 227,
229, 233, 239, 241, 251, 257, 263, 269, 271, 277,
281, 283, 293, 307, 311, 313, 317, 331, 337, 347,
349, 353, 359, 367, 373, 379, 383, 389, 397, 401,
409, 419, 421, 431, 433, 439, 443, 449, 457, 461,
463, 467, 479, 487, 491, 499, 503, 509, 521, 523,
541, 547, 557, 563, 569, 571, 577, 587, 593, 599,
601, 607, 613, 617, 619, 631, 641, 643, 647, 653,
659, 661, 673, 677, 683, 691, 701, 709, 719, 727,
733, 739, 743, 751, 757, 761, 769, 773, 787, 797,
809, 811, 821, 823, 827, 829, 839, 853, 857, 859,
863, 877, 881, 883, 887, 907, 911, 919, 929, 937,
941, 947, 953, 967, 971, 977, 983, 991, 997, 1009,
1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063,
1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129,
1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217,
1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289,
1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367,
1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447,
1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499,
1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579,
1583, 1597, 1601, 1607, 1609, 1613
}

Referenced by DetermineFactors(), and IsOddPrime().

OBRingTyper ringtyper

Variable Documentation 1559


Open Babel: API Documentation

Referenced by OBRing::GetType().

int SINT = 0x00000001 [static]

unsigned char* STPTR = (unsigned char*)&SINT [static]

SpaceGroups _SpaceGroups [static]

Referenced by SpaceGroup::Find(), SpaceGroup::GetSpaceGroup(), and SpaceGroup::RegisterSpaceGroup().

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

• Namespace List
• Namespace Members

OpenBabel::OBAminoAcidProperty

Variable Documentation 1560


OpenBabel::OBAminoAcidProperty Namespace
Reference
Residue property definitions. More...

Enumerations
enum {
ACIDIC = 0, ACYCLIC = 1, ALIPHATIC = 2, AROMATIC = 3,
BASIC = 4, BURIED = 5, CHARGED = 6, CYCLIC = 7,
HYDROPHOBIC = 8, LARGE = 9, MEDIUM = 10, NEGATIVE
= 11,
NEUTRAL = 12, POLAR = 13, POSITIVE = 14, SMALL = 15,
SURFACE = 16
}

Detailed Description
Residue property definitions.

Enumeration Type Documentation

anonymous enum

Enumerator:
ACIDIC
ACYCLIC
ALIPHATIC
AROMATIC
BASIC
BURIED
CHARGED
CYCLIC
HYDROPHOBIC
LARGE
MEDIUM
NEGATIVE
NEUTRAL
POLAR
POSITIVE
SMALL
SURFACE

OpenBabel::OBAminoAcidProperty Namespace Reference 1561


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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

OpenBabel::OBGenericDataType

Enumeration Type Documentation 1562


OpenBabel::OBGenericDataType Namespace
Reference
Classification of data stored via OBGenericData class and subclasses. More...

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
}

Detailed Description
Classification of data stored via OBGenericData class and subclasses.

OBGenericDataType can be used as a faster, direct access to a particular category instead of the slower access
via GetData(std::string), which must loop through all data to find a match with the supplied key. It is
implemented as a set of unsigned integer constants for maximum flexibility and future expansion.

CustomData0 through CustomData15 are data slots that are not used in OpenBabel directly and are meant for
use in derivative programs. Macro definitions can be used to define what each data slot is used in your code.

Enumeration Type Documentation

anonymous enum

Enumerator:
UndefinedData Unknown data type (default).
PairData Arbitrary key/value data, i.e., OBPairData.
EnergyData Energetics data (e.g., total energy, heat of formation, etc.).
CommentData

OpenBabel::OBGenericDataType Namespace Reference 1563


Open Babel: API Documentation

Storing text comments (one per molecule, atom, bond, etc.) (for other data, e.g.,
author, keyword, ... use OBPairData).
ConformerData Arbitrary information about conformers, i.e., OBConformerData.
ExternalBondData Bond data external to OpenBabel, i.e., OBExternalBond, OBExternalBondData.
RotamerList Information for generating & manipulating rotamers, i.e. OBRotamerList.
VirtualBondData Info. for storing bonds to atoms yet to be added, i.e. OBVirtualBond.
RingData Information on rings in a molecule, i.e., OBRingData.
TorsionData Information about torsion/dihedral angles, i.e., OBTorsionData and OBTorsion.
AngleData Bond angles in a molecule, i.e., OBAngle, OBAngleData.
SerialNums Residue serial numbers.
UnitCell Crystallographic unit cell data, i.e., OBUnitCell.
SpinData Spin data, including NMR, atomic and molecular spin, etc.
ChargeData Arbitrary partial and total charges, dipole moments, etc.
SymmetryData Symmetry data -- point and space groups, transforms, etc. i.e., OBSymmetryData.
ChiralData Arbitrary chiral information (atom, bond, molecule, etc.) i.e., OBChiralData.
OccupationData Atomic and molecular occupation data.
DensityData Density (cube) data and surfaces.
ElectronicData Electronic levels, redox states, orbitals, etc.
VibrationData Vibrational modes, frequencies, etc.
RotationData Rotational energy information.
NuclearData Nuclear transitions (e.g., decay, capture, fission, fusion).
SetData Set Data (a set of OBGenericData).
GridData Grid Data (e.g., 3D grids of data a.k.a. cubes).
VectorData Vector Data (i.e., one vector like a dipole moment).
MatrixData Matrix data (i.e., a 3x3 matrix like a rotation or quadrupole moment).
CustomData0 Custom (user-defined data).
CustomData1
CustomData2
CustomData3
CustomData4
CustomData5
CustomData6
CustomData7
CustomData8
CustomData9
CustomData10
CustomData11
CustomData12
CustomData13
CustomData14
CustomData15

Enumeration Type Documentation 1564


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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

OpenBabel::OBResidueAtomProperty

Enumeration Type Documentation 1565


OpenBabel::OBResidueAtomProperty Namespace
Reference
Residue atom properties. More...

Enumerations
enum {
ALPHA_CARBON = 0, AMINO_BACKBONE = 1, BACKBONE = 2, CYSTEINE_SULPHUR = 3,
LIGAND = 4, NUCLEIC_BACKBONE = 5, SHAPELY_BACKBONE = 6, SHAPELY_SPECIAL =
7,
SIDECHAIN = 8, SUGAR_PHOSPHATE = 9
}

Detailed Description
Residue atom properties.

Enumeration Type Documentation

anonymous enum

Enumerator:
ALPHA_CARBON
AMINO_BACKBONE
BACKBONE
CYSTEINE_SULPHUR
LIGAND
NUCLEIC_BACKBONE
SHAPELY_BACKBONE
SHAPELY_SPECIAL
SIDECHAIN
SUGAR_PHOSPHATE

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

OpenBabel::OBResidueAtomProperty Namespace Reference 1566


Open Babel: API Documentation

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

• Namespace List
• Namespace Members

OpenBabel::OBResidueIndex

Enumeration Type Documentation 1567


OpenBabel::OBResidueIndex Namespace Reference
Residue names (index into Residue[] array). More...

Enumerations
enum {
ALA = 0, GLY = 1, LEU = 2, SER = 3,
VAL = 4, THR = 5, LYS = 6, ASP = 7,
ILE = 8, ASN = 9, GLU = 10, PRO = 11,
ARG = 12, PHE = 13, GLN = 14, TYR = 15,
HIS = 16, CYS = 17, MET = 18, TRP = 19,
ASX = 20, GLX = 21, PCA = 22, HYP = 23,
A = 24, C = 25, G = 26, T = 27,
U = 28, UPLUS = 29, I = 30, _1MA = 32,
_5MC = 32, OMC = 33, _1MG = 34, _2MG = 35,
M2G = 36, _7MG = 37, OMG = 38, YG = 39,
H2U = 40, _5MU = 41, PSU = 42, UNK = 43,
ACE = 44, FOR = 45, HOH = 46, DOD = 47,
SO4 = 48, PO4 = 49, NAD = 50, COA = 51,
NAP = 52, NDP = 53
}

Detailed Description
Residue names (index into Residue[] array).

Enumeration Type Documentation

anonymous enum

Enumerator:
ALA
GLY
LEU
SER
VAL
THR
LYS
ASP
ILE
ASN
GLU
PRO

OpenBabel::OBResidueIndex Namespace Reference 1568


Open Babel: API Documentation

ARG
PHE
GLN
TYR
HIS
CYS
MET
TRP
ASX
GLX
PCA
HYP
A
C
G
T
U
UPLUS
I
_1MA
_5MC
OMC
_1MG
_2MG
M2G
_7MG
OMG
YG
H2U
_5MU
PSU
UNK
ACE
FOR
HOH
DOD
SO4
PO4
NAD
COA
NAP
NDP

Enumeration Type Documentation 1569


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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

OpenBabel::OBResidueProperty

Enumeration Type Documentation 1570


OpenBabel::OBResidueProperty Namespace
Reference
Residue types. More...

Enumerations
enum {
AMINO = 0, AMINO_NUCLEO = 1, COENZYME = 2, ION = 3,
NUCLEO = 4, PROTEIN = 5, PURINE = 6, PYRIMIDINE = 7,
SOLVENT = 8, WATER = 9
}

Detailed Description
Residue types.

Enumeration Type Documentation

anonymous enum

Enumerator:
AMINO
AMINO_NUCLEO
COENZYME
ION
NUCLEO
PROTEIN
PURINE
PYRIMIDINE
SOLVENT
WATER

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

OpenBabel::OBResidueProperty Namespace Reference 1571


Open Babel: API Documentation

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

Enumeration Type Documentation 1572


Open Babel: API Documentation

-_-

• _1MA : OpenBabel::OBResidueIndex
• _1MG : OpenBabel::OBResidueIndex
• _2MG : OpenBabel::OBResidueIndex
• _5MC : OpenBabel::OBResidueIndex
• _5MU : OpenBabel::OBResidueIndex
• _7MG : OpenBabel::OBResidueIndex
• _SpaceGroups : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g

-_- 1573
Open Babel: API Documentation
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-k-

• KekulePropagate() : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions

-k- 1574
Open Babel: API Documentation
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-l-

• LARGE : OpenBabel::OBAminoAcidProperty
• LeadingZeros() : OpenBabel
• LEU : OpenBabel::OBResidueIndex
• LexPtr : OpenBabel
• LIGAND : OpenBabel::OBResidueAtomProperty
• LYS : OpenBabel::OBResidueIndex

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

-l- 1575
Open Babel: API Documentation

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-l- 1576
Open Babel: API Documentation

-m-

• M2G : OpenBabel::OBResidueIndex
• MainPtr : OpenBabel
• MarkGrowBonds() : OpenBabel
• match() : OpenBabel
• MatrixData : OpenBabel::OBGenericDataType
• MEDIUM : OpenBabel::OBAminoAcidProperty
• MET : OpenBabel::OBResidueIndex
• MinimumPairRMS() : OpenBabel
• MonoAtom : OpenBabel
• MonoAtomCount : OpenBabel
• MonoBond : OpenBabel
• MonoBondCount : OpenBabel
• mult_matrix() : OpenBabel
• mult_matrix_f() : OpenBabel
• mult_matrix_ff() : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

-m- 1577
Open Babel: API Documentation
•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-n-

• NAD : OpenBabel::OBResidueIndex
• NAP : OpenBabel::OBResidueIndex
• NDP : OpenBabel::OBResidueIndex
• NEGATIVE : OpenBabel::OBAminoAcidProperty
• NEUTRAL : OpenBabel::OBAminoAcidProperty
• NewExtension() : OpenBabel
• nibble_bit_count : OpenBabel
• NotAtomExpr() : OpenBabel
• NuclearData : OpenBabel::OBGenericDataType
• NUCLEIC_BACKBONE : OpenBabel::OBResidueAtomProperty
• NUCLEO : OpenBabel::OBResidueProperty
• Nucleotide : OpenBabel
• Nucleotides : OpenBabel

-n- 1578
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-n- 1579
Open Babel: API Documentation

-o-

• ob_make_rmat() : OpenBabel
• OBAtomIterator : OpenBabel
• obAuditMsg : OpenBabel
• OBBondIterator : OpenBabel
• OBCompareInt() : OpenBabel
• OBComparePairFirst() : OpenBabel
• OBComparePairSecond() : OpenBabel
• OBCompareUnsigned() : OpenBabel
• OBDataIterator : OpenBabel
• obDebug : OpenBabel
• OBEdgeBase : OpenBabel
• obError : OpenBabel
• obErrorLog : OpenBabel
• obInfo : OpenBabel
• obLocale : OpenBabel
• obMessageLevel : OpenBabel
• OBNodeBase : OpenBabel
• OBPairFloatingPoint : OpenBabel
• OBPairInteger : OpenBabel
• OBResidueIterator : OpenBabel
• OBRotorIterator : OpenBabel
• obWarning : OpenBabel
• OccupationData : OpenBabel::OBGenericDataType
• OMC : OpenBabel::OBResidueIndex
• OMG : OpenBabel::OBResidueIndex
• onceOnly : OpenBabel
• OpenDatafile() : OpenBabel
• operator &() : OpenBabel
• operator*() : OpenBabel
• operator+() : OpenBabel
• operator-() : OpenBabel
• operator/() : OpenBabel
• operator<() : OpenBabel
• operator<<() : OpenBabel
• operator==() : OpenBabel
• operator>>() : OpenBabel
• operator^() : OpenBabel
• operator|() : OpenBabel
• OrAtomExpr() : OpenBabel
• OrAtomExprLeaf() : OpenBabel
• OrderAtomExpr() : OpenBabel
• output : OpenBabel

-o- 1580
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s

-o- 1581
Open Babel: API Documentation
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-a-

• A : OpenBabel::OBResidueIndex
• ACE : OpenBabel::OBResidueIndex
• ACIDIC : OpenBabel::OBAminoAcidProperty
• ACYCLIC : OpenBabel::OBAminoAcidProperty
• ALA : OpenBabel::OBResidueIndex
• AliasDataType : OpenBabel
• ALIPHATIC : OpenBabel::OBAminoAcidProperty
• AllocateByteCode() : OpenBabel
• AllocAtomExpr() : OpenBabel
• AllocBondExpr() : OpenBabel
• AllocPattern() : OpenBabel
• ALPHA_CARBON : OpenBabel::OBResidueAtomProperty
• always : OpenBabel
• AMINO : OpenBabel::OBResidueProperty
• AMINO_BACKBONE : OpenBabel::OBResidueAtomProperty
• AMINO_NUCLEO : OpenBabel::OBResidueProperty
• AminoAcids : OpenBabel
• AndAtomExpr() : OpenBabel
• AndAtomExprLeaf() : OpenBabel
• AngleData : OpenBabel::OBGenericDataType
• any : OpenBabel
• ApplyRotMatToBond() : OpenBabel
• ARG : OpenBabel::OBResidueIndex
• AROMATIC : OpenBabel::OBAminoAcidProperty
• aromtyper : OpenBabel
• ASN : OpenBabel::OBResidueIndex
• ASP : OpenBabel::OBResidueIndex
• ASX : OpenBabel::OBResidueIndex
• AtomExpr : OpenBabel
• AtomExprConflict() : OpenBabel
• AtomExprImplied() : OpenBabel
• AtomExprImplies() : OpenBabel
• AtomIndex : OpenBabel
• AtomLeafConflict() : OpenBabel
• AtomLeafImplies() : OpenBabel
• atomreftype : OpenBabel
• atomtyper : OpenBabel

-a- 1582
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s

-a- 1583
Open Babel: API Documentation
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-b-

• BACKBONE : OpenBabel::OBResidueAtomProperty
• BASIC : OpenBabel::OBAminoAcidProperty
• bitsoff : OpenBabel
• BondExpr : OpenBabel
• BondIndex : OpenBabel
• bondtyper : OpenBabel
• BreakChiralTies() : OpenBabel
• Buffer : OpenBabel
• BuildAtomBin() : OpenBabel
• BuildAtomLeaf() : OpenBabel
• BuildAtomNot() : OpenBabel
• BuildAtomRecurs() : OpenBabel
• BuildBondBin() : OpenBabel
• BuildBondLeaf() : OpenBabel
• BuildBondNot() : OpenBabel
• BuildOBRTreeVector() : OpenBabel
• BURIED : OpenBabel::OBAminoAcidProperty
• ByteCode : OpenBabel

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

-b- 1584
Open Babel: API Documentation
• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-c-

• C : OpenBabel::OBResidueIndex
• calc_rms() : OpenBabel
• CalcSignedVolume() : OpenBabel
• CalcTorsionAngle() : OpenBabel
• CalculateSymmetry() : OpenBabel
• calcvolume : OpenBabel
• CanBeSquared() : OpenBabel
• CanonicalLabels() : OpenBabel
• CartesianToInternal() : OpenBabel
• center_coords() : OpenBabel
• ChainsAtomName : OpenBabel
• chainsparser : OpenBabel

-c- 1585
Open Babel: API Documentation
• CHARGED : OpenBabel::OBAminoAcidProperty
• ChargeData : OpenBabel::OBGenericDataType
• ChemScore : OpenBabel
• ChiralData : OpenBabel::OBGenericDataType
• ClassCount() : OpenBabel
• CleanAtomType() : OpenBabel
• COA : OpenBabel::OBResidueIndex
• COENZYME : OpenBabel::OBResidueProperty
• CommentData : OpenBabel::OBGenericDataType
• CompareBondPairSecond() : OpenBabel
• ComparePairFirst() : OpenBabel
• ComparePairSecond() : OpenBabel
• CompareRingSize() : OpenBabel
• CompareRotor() : OpenBabel
• CompareUnsigned() : OpenBabel
• ConformerData : OpenBabel::OBGenericDataType
• ConstrainRecursion() : OpenBabel
• construct_c_matrix() : OpenBabel
• construct_g_matrix() : OpenBabel
• convert_matrix_f() : OpenBabel
• convert_matrix_f_ff() : OpenBabel
• convert_matrix_ff() : OpenBabel
• convert_matrix_ff_f() : OpenBabel
• CopyAtomExpr() : OpenBabel
• CopyBondExpr() : OpenBabel
• CopyPattern() : OpenBabel
• CorrectBadResonanceForm() : OpenBabel
• CorrectChirality() : OpenBabel
• CountAndRenumberClasses() : OpenBabel
• CreateAtom() : OpenBabel
• CreateBond() : OpenBabel
• CreateNewClassVector() : OpenBabel
• cross() : OpenBabel
• CubeRoot() : OpenBabel
• CustomData0 : OpenBabel::OBGenericDataType
• CustomData1 : OpenBabel::OBGenericDataType
• CustomData10 : OpenBabel::OBGenericDataType
• CustomData11 : OpenBabel::OBGenericDataType
• CustomData12 : OpenBabel::OBGenericDataType
• CustomData13 : OpenBabel::OBGenericDataType
• CustomData14 : OpenBabel::OBGenericDataType
• CustomData15 : OpenBabel::OBGenericDataType
• CustomData2 : OpenBabel::OBGenericDataType
• CustomData3 : OpenBabel::OBGenericDataType
• CustomData4 : OpenBabel::OBGenericDataType
• CustomData5 : OpenBabel::OBGenericDataType
• CustomData6 : OpenBabel::OBGenericDataType
• CustomData7 : OpenBabel::OBGenericDataType
• CustomData8 : OpenBabel::OBGenericDataType
• CustomData9 : OpenBabel::OBGenericDataType
• CYCLIC : OpenBabel::OBAminoAcidProperty

-c- 1586
Open Babel: API Documentation

• CYS : OpenBabel::OBResidueIndex
• CYSTEINE_SULPHUR : OpenBabel::OBResidueAtomProperty

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p

-c- 1587
Open Babel: API Documentation
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-d-

• DataOrigin : OpenBabel
• DeleteByteCode() : OpenBabel
• DensityData : OpenBabel::OBGenericDataType
• Descr : OpenBabel
• DetermineFactors() : OpenBabel
• DetermineFRJ() : OpenBabel
• DetermineIncrement() : OpenBabel
• DeterminePotency() : OpenBabel
• DetermineSequence() : OpenBabel
• DoComparison() : OpenBabel
• DOD : OpenBabel::OBResidueIndex
• dot() : OpenBabel
• DoubleAdd() : OpenBabel
• DoubleModulus() : OpenBabel
• DoubleMultiply() : OpenBabel

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

-d- 1588
Open Babel: API Documentation
• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-e-

• ElectronicData : OpenBabel::OBGenericDataType
• ElemDesc : OpenBabel
• ElemNo : OpenBabel
• EnergyData : OpenBabel::OBGenericDataType
• EqualAtomExpr() : OpenBabel
• EquivalentBondExpr() : OpenBabel
• errorQualifier : OpenBabel
• etab : OpenBabel
• EvalAtomExpr() : OpenBabel
• EvalBondExpr() : OpenBabel
• ExpandKekule() : OpenBabel
• ExtendInvarients() : OpenBabel

-e- 1589
Open Babel: API Documentation

• external : OpenBabel
• ExternalBondData : OpenBabel::OBGenericDataType

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p

-e- 1590
Open Babel: API Documentation
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-f-

• FastSingleMatch() : OpenBabel
• FatalAllocationError() : OpenBabel
• FatalMemoryError() : OpenBabel
• fileformatInput : OpenBabel
• FindConjugatedEZBonds() : OpenBabel
• FindRingAtoms() : OpenBabel
• FindRings() : OpenBabel
• FixCisTransBonds() : OpenBabel
• FOR : OpenBabel::OBResidueIndex
• Formatpos : OpenBabel
• FreeAtomExpr() : OpenBabel
• FreeBondExpr() : OpenBabel
• FreePattern() : OpenBabel

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

• Namespace List

-f- 1591
Open Babel: API Documentation
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-g-

• G : OpenBabel::OBResidueIndex
• GenerateAromElem() : OpenBabel
• GenerateByteCodes() : OpenBabel
• GenerateDefaultBond() : OpenBabel
• GenerateElement() : OpenBabel
• GenerateSequence() : OpenBabel
• get_rmat() : OpenBabel
• get_roots_3_3() : OpenBabel
• GetAtomIDNumber() : OpenBabel
• GetBondExprIndex() : OpenBabel
• GetBondLeafIndex() : OpenBabel
• GetChiralFlag() : OpenBabel
• GetChirality() : OpenBabel

-g- 1592
Open Babel: API Documentation
• GetCurrentValence() : OpenBabel
• GetDFFVector() : OpenBabel
• GetExprOrder() : OpenBabel
• GetGIVector() : OpenBabel
• GetGTDVector() : OpenBabel
• GetHvyBondSum() : OpenBabel
• GetHvyValence() : OpenBabel
• GetParity4Ref() : OpenBabel
• GetResidueNumber() : OpenBabel
• GetValence() : OpenBabel
• GetVectorBinding() : OpenBabel
• GLN : OpenBabel::OBResidueIndex
• GLU : OpenBabel::OBResidueIndex
• GLX : OpenBabel::OBResidueIndex
• GLY : OpenBabel::OBResidueIndex
• GraphPotentials() : OpenBabel
• GridData : OpenBabel::OBGenericDataType

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_

-g- 1593
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-h-

• H2U : OpenBabel::OBResidueIndex
• HIS : OpenBabel::OBResidueIndex
• HOH : OpenBabel::OBResidueIndex
• HYDROPHOBIC : OpenBabel::OBAminoAcidProperty
• HYP : OpenBabel::OBResidueIndex

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.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-i-

• I : OpenBabel::OBResidueIndex
• ILE : OpenBabel::OBResidueIndex
• input : OpenBabel
• InternalToCartesian() : OpenBabel
• invert_matrix() : OpenBabel
• invert_matrix_f() : OpenBabel

-i- 1595
Open Babel: API Documentation
• invert_matrix_ff() : OpenBabel
• InvertCase() : OpenBabel
• ION : OpenBabel::OBResidueProperty
• IsApprox() : OpenBabel
• IsApprox_pos() : OpenBabel
• IsBooleanAtomLeaf() : OpenBabel
• IsInvalidAtom() : OpenBabel
• IsNan() : OpenBabel
• IsNear() : OpenBabel
• IsNearZero() : OpenBabel
• IsNegatingAtomLeaf() : OpenBabel
• IsNegligible() : OpenBabel
• IsOddPrime() : OpenBabel
• isotab : OpenBabel
• isqrt() : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b

-i- 1596
Open Babel: API Documentation
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-p-

• PackCoordinate() : OpenBabel
• PairData : OpenBabel::OBGenericDataType
• ParseAtomExpr() : OpenBabel
• ParseBondExpr() : OpenBabel
• ParseBondPrimitive() : OpenBabel
• ParseComplexAtomPrimitive() : OpenBabel
• ParseSimpleAtomPrimitive() : OpenBabel
• ParseSMARTSError() : OpenBabel
• ParseSMARTSPart() : OpenBabel
• ParseSMARTSPattern() : OpenBabel
• ParseSMARTSRecord() : OpenBabel
• ParseSMARTSString() : OpenBabel
• PCA : OpenBabel::OBResidueIndex
• Peptide : OpenBabel
• perceived : OpenBabel
• PHE : OpenBabel::OBResidueIndex
• phmodel : OpenBabel
• PLP : OpenBabel
• PO4 : OpenBabel::OBResidueIndex
• Point2Plane() : OpenBabel
• Point2PlaneAngle() : OpenBabel
• PointGroups : OpenBabel
• POLAR : OpenBabel::OBAminoAcidProperty
• POSITIVE : OpenBabel::OBAminoAcidProperty
• primes : OpenBabel

-p- 1597
Open Babel: API Documentation
• print_matrix() : OpenBabel
• print_matrix_f() : OpenBabel
• print_matrix_ff() : OpenBabel
• PRO : OpenBabel::OBResidueIndex
• PROTEIN : OpenBabel::OBResidueProperty
• PSU : OpenBabel::OBResidueIndex
• PURINE : OpenBabel::OBResidueProperty
• PYRIMIDINE : OpenBabel::OBResidueProperty

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i

-p- 1598
Open Babel: API Documentation
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-q-

• qtrfit() : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs

-q- 1599
Open Babel: API Documentation
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-r-

• RateData : OpenBabel
• RelativelyPrime() : OpenBabel
• resdat : OpenBabel
• Residue : OpenBabel
• ResNo : OpenBabel
• Reweight() : OpenBabel
• RingData : OpenBabel::OBGenericDataType
• ringtyper : OpenBabel
• rint() : OpenBabel
• Roots : OpenBabel
• RotamerList : OpenBabel::OBGenericDataType
• rotate_coords() : OpenBabel
• RotationData : OpenBabel::OBGenericDataType
• RSCACHE : OpenBabel

-r- 1600
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s

-r- 1601
Open Babel: API Documentation
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-s-

• SafeOpen() : OpenBabel
• score_t : OpenBabel
• SER : OpenBabel::OBResidueIndex
• SerialNums : OpenBabel::OBGenericDataType
• SetData : OpenBabel::OBGenericDataType
• SetResidueKeys() : OpenBabel
• SetRotorToAngle() : OpenBabel
• SetupAtomMatchTable() : OpenBabel
• SHAPELY_BACKBONE : OpenBabel::OBResidueAtomProperty
• SHAPELY_SPECIAL : OpenBabel::OBResidueAtomProperty
• SIDECHAIN : OpenBabel::OBResidueAtomProperty
• signed_volume() : OpenBabel
• SINT : OpenBabel
• SMALL : OpenBabel::OBAminoAcidProperty
• SMARTSError() : OpenBabel
• SmartsLexReplace() : OpenBabel
• SMARTSParser() : OpenBabel
• SO4 : OpenBabel::OBResidueIndex
• SolveCubic() : OpenBabel
• SolveLinear() : OpenBabel
• SOLVENT : OpenBabel::OBResidueProperty
• SolveQuadratic() : OpenBabel
• SortAtomZ() : OpenBabel
• SortVVInt() : OpenBabel
• SPACE_GROUP_HALL : OpenBabel
• SPACE_GROUP_HM : OpenBabel
• SPACE_GROUP_ID : OpenBabel
• SPACE_GROUP_TRANSFORM : OpenBabel
• SpinData : OpenBabel::OBGenericDataType
• SQUARE() : OpenBabel
• Stack : OpenBabel
• StackPtr : OpenBabel
• STPTR : OpenBabel
• StrictFlag : OpenBabel
• SUGAR_PHOSPHATE : OpenBabel::OBResidueAtomProperty
• superimpose() : OpenBabel
• SURFACE : OpenBabel::OBAminoAcidProperty
• Swab() : OpenBabel
• SwabInt : OpenBabel
• SymmetryData : OpenBabel::OBGenericDataType

-s- 1602
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r

-s- 1603
Open Babel: API Documentation
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-t-

• T : OpenBabel::OBResidueIndex
• Tanimoto() : OpenBabel
• Template : OpenBabel
• theOpCenter() : OpenBabel
• ThermoData : OpenBabel
• THR : OpenBabel::OBResidueIndex
• ThrowError() : OpenBabel
• tokenize() : OpenBabel
• ToLower() : OpenBabel
• Tolower() : OpenBabel
• TorsionData : OpenBabel::OBGenericDataType
• Toupper() : OpenBabel
• ToUpper() : OpenBabel
• transform3dIterator : OpenBabel
• TraverseSMARTS() : OpenBabel
• Trim() : OpenBabel
• trim_spaces() : OpenBabel
• TRP : OpenBabel::OBResidueIndex
• ttab : OpenBabel
• TYR : OpenBabel::OBResidueIndex

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

-t- 1604
Open Babel: API Documentation
• Namespaces
• Classes
• Files

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-u-

• U : OpenBabel::OBResidueIndex
• Undefined : OpenBabel
• UndefinedData : OpenBabel::OBGenericDataType
• UnitCell : OpenBabel::OBGenericDataType
• UNK : OpenBabel::OBResidueIndex
• UnpackCoordinate() : OpenBabel
• UPLUS : OpenBabel::OBResidueIndex
• userInput : OpenBabel

-u- 1605
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:58 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r

-u- 1606
Open Babel: API Documentation
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-v-

• VAL : OpenBabel::OBResidueIndex
• ValenceSum() : OpenBabel
• vectorAngle() : OpenBabel
• VectorData : OpenBabel::OBGenericDataType
• VibrationData : OpenBabel::OBGenericDataType
• VirtualBondData : OpenBabel::OBGenericDataType
• VX() : OpenBabel
• VY : OpenBabel
• VZ : OpenBabel
• VZero() : OpenBabel

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables

-v- 1607
Open Babel: API Documentation
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-w-

• WATER : OpenBabel::OBResidueProperty
• WriteTitles() : OpenBabel

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:

-w- 1608
Open Babel: API Documentation

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

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w
•y

Here is a list of all namespace members with links to the namespace documentation for each member:

-y-

• YG : OpenBabel::OBResidueIndex

-y- 1609
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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

• atomreftype : OpenBabel
• DataOrigin : OpenBabel
• errorQualifier : OpenBabel
• obMessageLevel : OpenBabel
• score_t : OpenBabel

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

-y- 1610
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•f
•g
•h
•i
•l
•m
•n
•o
•p
•r
•s
•t
•u
•v
•w
•y

-_-

• _1MA : OpenBabel::OBResidueIndex

-_- 1611
Open Babel: API Documentation
• _1MG : OpenBabel::OBResidueIndex
• _2MG : OpenBabel::OBResidueIndex
• _5MC : OpenBabel::OBResidueIndex
• _5MU : OpenBabel::OBResidueIndex
• _7MG : OpenBabel::OBResidueIndex

-a-

• A : OpenBabel::OBResidueIndex
• ACE : OpenBabel::OBResidueIndex
• ACIDIC : OpenBabel::OBAminoAcidProperty
• ACYCLIC : OpenBabel::OBAminoAcidProperty
• ALA : OpenBabel::OBResidueIndex
• ALIPHATIC : OpenBabel::OBAminoAcidProperty
• ALPHA_CARBON : OpenBabel::OBResidueAtomProperty
• always : OpenBabel
• AMINO : OpenBabel::OBResidueProperty
• AMINO_BACKBONE : OpenBabel::OBResidueAtomProperty
• AMINO_NUCLEO : OpenBabel::OBResidueProperty
• AngleData : OpenBabel::OBGenericDataType
• any : OpenBabel
• ARG : OpenBabel::OBResidueIndex
• AROMATIC : OpenBabel::OBAminoAcidProperty
• ASN : OpenBabel::OBResidueIndex
• ASP : OpenBabel::OBResidueIndex
• ASX : OpenBabel::OBResidueIndex

-b-

• BACKBONE : OpenBabel::OBResidueAtomProperty
• BASIC : OpenBabel::OBAminoAcidProperty
• BURIED : OpenBabel::OBAminoAcidProperty

-c-

• C : OpenBabel::OBResidueIndex
• calcvolume : OpenBabel
• CHARGED : OpenBabel::OBAminoAcidProperty
• ChargeData : OpenBabel::OBGenericDataType
• ChemScore : OpenBabel
• ChiralData : OpenBabel::OBGenericDataType
• COA : OpenBabel::OBResidueIndex
• COENZYME : OpenBabel::OBResidueProperty
• CommentData : OpenBabel::OBGenericDataType
• ConformerData : OpenBabel::OBGenericDataType
• CustomData0 : OpenBabel::OBGenericDataType
• CustomData1 : OpenBabel::OBGenericDataType
• CustomData10 : OpenBabel::OBGenericDataType
• CustomData11 : OpenBabel::OBGenericDataType
• CustomData12 : OpenBabel::OBGenericDataType

-a- 1612
Open Babel: API Documentation
• CustomData13 : OpenBabel::OBGenericDataType
• CustomData14 : OpenBabel::OBGenericDataType
• CustomData15 : OpenBabel::OBGenericDataType
• CustomData2 : OpenBabel::OBGenericDataType
• CustomData3 : OpenBabel::OBGenericDataType
• CustomData4 : OpenBabel::OBGenericDataType
• CustomData5 : OpenBabel::OBGenericDataType
• CustomData6 : OpenBabel::OBGenericDataType
• CustomData7 : OpenBabel::OBGenericDataType
• CustomData8 : OpenBabel::OBGenericDataType
• CustomData9 : OpenBabel::OBGenericDataType
• CYCLIC : OpenBabel::OBAminoAcidProperty
• CYS : OpenBabel::OBResidueIndex
• CYSTEINE_SULPHUR : OpenBabel::OBResidueAtomProperty

-d-

• DensityData : OpenBabel::OBGenericDataType
• DOD : OpenBabel::OBResidueIndex

-e-

• ElectronicData : OpenBabel::OBGenericDataType
• EnergyData : OpenBabel::OBGenericDataType
• external : OpenBabel
• ExternalBondData : OpenBabel::OBGenericDataType

-f-

• fileformatInput : OpenBabel
• FOR : OpenBabel::OBResidueIndex

-g-

• G : OpenBabel::OBResidueIndex
• GLN : OpenBabel::OBResidueIndex
• GLU : OpenBabel::OBResidueIndex
• GLX : OpenBabel::OBResidueIndex
• GLY : OpenBabel::OBResidueIndex
• GridData : OpenBabel::OBGenericDataType

-h-

• H2U : OpenBabel::OBResidueIndex
• HIS : OpenBabel::OBResidueIndex
• HOH : OpenBabel::OBResidueIndex
• HYDROPHOBIC : OpenBabel::OBAminoAcidProperty
• HYP : OpenBabel::OBResidueIndex

-c- 1613
Open Babel: API Documentation

-i-

• I : OpenBabel::OBResidueIndex
• ILE : OpenBabel::OBResidueIndex
• input : OpenBabel
• ION : OpenBabel::OBResidueProperty

-l-

• LARGE : OpenBabel::OBAminoAcidProperty
• LEU : OpenBabel::OBResidueIndex
• LIGAND : OpenBabel::OBResidueAtomProperty
• LYS : OpenBabel::OBResidueIndex

-m-

• M2G : OpenBabel::OBResidueIndex
• MatrixData : OpenBabel::OBGenericDataType
• MEDIUM : OpenBabel::OBAminoAcidProperty
• MET : OpenBabel::OBResidueIndex

-n-

• NAD : OpenBabel::OBResidueIndex
• NAP : OpenBabel::OBResidueIndex
• NDP : OpenBabel::OBResidueIndex
• NEGATIVE : OpenBabel::OBAminoAcidProperty
• NEUTRAL : OpenBabel::OBAminoAcidProperty
• NuclearData : OpenBabel::OBGenericDataType
• NUCLEIC_BACKBONE : OpenBabel::OBResidueAtomProperty
• NUCLEO : OpenBabel::OBResidueProperty

-o-

• obAuditMsg : OpenBabel
• obDebug : OpenBabel
• obError : OpenBabel
• obInfo : OpenBabel
• obWarning : OpenBabel
• OccupationData : OpenBabel::OBGenericDataType
• OMC : OpenBabel::OBResidueIndex
• OMG : OpenBabel::OBResidueIndex
• onceOnly : OpenBabel
• output : OpenBabel

-p-

• PairData : OpenBabel::OBGenericDataType
• PCA : OpenBabel::OBResidueIndex
• perceived : OpenBabel

-i- 1614
Open Babel: API Documentation
• PHE : OpenBabel::OBResidueIndex
• PLP : OpenBabel
• PO4 : OpenBabel::OBResidueIndex
• POLAR : OpenBabel::OBAminoAcidProperty
• POSITIVE : OpenBabel::OBAminoAcidProperty
• PRO : OpenBabel::OBResidueIndex
• PROTEIN : OpenBabel::OBResidueProperty
• PSU : OpenBabel::OBResidueIndex
• PURINE : OpenBabel::OBResidueProperty
• PYRIMIDINE : OpenBabel::OBResidueProperty

-r-

• RingData : OpenBabel::OBGenericDataType
• RotamerList : OpenBabel::OBGenericDataType
• RotationData : OpenBabel::OBGenericDataType

-s-

• SER : OpenBabel::OBResidueIndex
• SerialNums : OpenBabel::OBGenericDataType
• SetData : OpenBabel::OBGenericDataType
• SHAPELY_BACKBONE : OpenBabel::OBResidueAtomProperty
• SHAPELY_SPECIAL : OpenBabel::OBResidueAtomProperty
• SIDECHAIN : OpenBabel::OBResidueAtomProperty
• SMALL : OpenBabel::OBAminoAcidProperty
• SO4 : OpenBabel::OBResidueIndex
• SOLVENT : OpenBabel::OBResidueProperty
• SPACE_GROUP_HALL : OpenBabel
• SPACE_GROUP_HM : OpenBabel
• SPACE_GROUP_ID : OpenBabel
• SPACE_GROUP_TRANSFORM : OpenBabel
• SpinData : OpenBabel::OBGenericDataType
• SUGAR_PHOSPHATE : OpenBabel::OBResidueAtomProperty
• SURFACE : OpenBabel::OBAminoAcidProperty
• SymmetryData : OpenBabel::OBGenericDataType

-t-

• T : OpenBabel::OBResidueIndex
• THR : OpenBabel::OBResidueIndex
• TorsionData : OpenBabel::OBGenericDataType
• TRP : OpenBabel::OBResidueIndex
• TYR : OpenBabel::OBResidueIndex

-u-

• U : OpenBabel::OBResidueIndex
• Undefined : OpenBabel
• UndefinedData : OpenBabel::OBGenericDataType

-p- 1615
Open Babel: API Documentation
• UnitCell : OpenBabel::OBGenericDataType
• UNK : OpenBabel::OBResidueIndex
• UPLUS : OpenBabel::OBResidueIndex
• userInput : OpenBabel

-v-

• VAL : OpenBabel::OBResidueIndex
• VectorData : OpenBabel::OBGenericDataType
• VibrationData : OpenBabel::OBGenericDataType
• VirtualBondData : OpenBabel::OBGenericDataType

-w-

• WATER : OpenBabel::OBResidueProperty

-y-

• YG : OpenBabel::OBResidueIndex

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations

-u- 1616
Open Babel: API Documentation
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-a-

• AllocateByteCode() : OpenBabel
• AllocAtomExpr() : OpenBabel
• AllocBondExpr() : OpenBabel
• AllocPattern() : OpenBabel
• AndAtomExpr() : OpenBabel
• AndAtomExprLeaf() : OpenBabel
• ApplyRotMatToBond() : OpenBabel
• AtomExprConflict() : OpenBabel
• AtomExprImplied() : OpenBabel
• AtomExprImplies() : OpenBabel
• AtomLeafConflict() : OpenBabel
• AtomLeafImplies() : OpenBabel

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

-y- 1617
Open Babel: API Documentation

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

Open Babel is hosted by:


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

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-k-

• KekulePropagate() : OpenBabel

-a- 1618
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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u

-k- 1619
Open Babel: API Documentation

•v
•w

-l-

• LeadingZeros() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k

-l- 1620
Open Babel: API Documentation
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-m-

• MarkGrowBonds() : OpenBabel
• match() : OpenBabel
• MinimumPairRMS() : OpenBabel
• mult_matrix() : OpenBabel
• mult_matrix_f() : OpenBabel
• mult_matrix_ff() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All

-m- 1621
Open Babel: API Documentation
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-n-

• NewExtension() : OpenBabel
• NotAtomExpr() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-o-

• ob_make_rmat() : OpenBabel
• OBCompareInt() : OpenBabel
• OBComparePairFirst() : OpenBabel
• OBComparePairSecond() : OpenBabel
• OBCompareUnsigned() : OpenBabel
• OpenDatafile() : OpenBabel
• operator &() : OpenBabel
• operator*() : OpenBabel
• operator+() : OpenBabel

-o- 1623
Open Babel: API Documentation
• operator-() : OpenBabel
• operator/() : OpenBabel
• operator<() : OpenBabel
• operator<<() : OpenBabel
• operator==() : OpenBabel
• operator>>() : OpenBabel
• operator^() : OpenBabel
• operator|() : OpenBabel
• OrAtomExpr() : OpenBabel
• OrAtomExprLeaf() : OpenBabel
• OrderAtomExpr() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g

-o- 1624
Open Babel: API Documentation
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-b-

• BreakChiralTies() : OpenBabel
• BuildAtomBin() : OpenBabel
• BuildAtomLeaf() : OpenBabel
• BuildAtomNot() : OpenBabel
• BuildAtomRecurs() : OpenBabel
• BuildBondBin() : OpenBabel
• BuildBondLeaf() : OpenBabel
• BuildBondNot() : OpenBabel
• BuildOBRTreeVector() : OpenBabel

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:59 2008 by 1.5.6.

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

-b- 1625
Open Babel: API Documentation
• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-c-

• calc_rms() : OpenBabel
• CalcSignedVolume() : OpenBabel
• CalcTorsionAngle() : OpenBabel
• CalculateSymmetry() : OpenBabel
• CanBeSquared() : OpenBabel
• CanonicalLabels() : OpenBabel
• CartesianToInternal() : OpenBabel
• center_coords() : OpenBabel
• ClassCount() : OpenBabel
• CleanAtomType() : OpenBabel
• CompareBondPairSecond() : OpenBabel
• ComparePairFirst() : OpenBabel
• ComparePairSecond() : OpenBabel
• CompareRingSize() : OpenBabel
• CompareRotor() : OpenBabel

-c- 1626
Open Babel: API Documentation
• CompareUnsigned() : OpenBabel
• ConstrainRecursion() : OpenBabel
• construct_c_matrix() : OpenBabel
• construct_g_matrix() : OpenBabel
• convert_matrix_f() : OpenBabel
• convert_matrix_f_ff() : OpenBabel
• convert_matrix_ff() : OpenBabel
• convert_matrix_ff_f() : OpenBabel
• CopyAtomExpr() : OpenBabel
• CopyBondExpr() : OpenBabel
• CopyPattern() : OpenBabel
• CorrectBadResonanceForm() : OpenBabel
• CorrectChirality() : OpenBabel
• CountAndRenumberClasses() : OpenBabel
• CreateAtom() : OpenBabel
• CreateBond() : OpenBabel
• CreateNewClassVector() : OpenBabel
• cross() : OpenBabel
• CubeRoot() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

-c- 1627
Open Babel: API Documentation
•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-d-

• DeleteByteCode() : OpenBabel
• DetermineFactors() : OpenBabel
• DetermineFRJ() : OpenBabel
• DetermineIncrement() : OpenBabel
• DeterminePotency() : OpenBabel
• DetermineSequence() : OpenBabel
• DoComparison() : OpenBabel
• dot() : OpenBabel
• DoubleAdd() : OpenBabel
• DoubleModulus() : OpenBabel
• DoubleMultiply() : OpenBabel

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:

-d- 1628
Open Babel: API Documentation

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

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-e-

• EqualAtomExpr() : OpenBabel
• EquivalentBondExpr() : OpenBabel
• EvalAtomExpr() : OpenBabel
• EvalBondExpr() : OpenBabel
• ExpandKekule() : OpenBabel

-e- 1629
Open Babel: API Documentation

• ExtendInvarients() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s

-e- 1630
Open Babel: API Documentation
•t
•u
•v
•w

-f-

• FastSingleMatch() : OpenBabel
• FatalAllocationError() : OpenBabel
• FatalMemoryError() : OpenBabel
• FindConjugatedEZBonds() : OpenBabel
• FindRingAtoms() : OpenBabel
• FindRings() : OpenBabel
• FixCisTransBonds() : OpenBabel
• FreeAtomExpr() : OpenBabel
• FreeBondExpr() : OpenBabel
• FreePattern() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations

-f- 1631
Open Babel: API Documentation
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-g-

• GenerateAromElem() : OpenBabel
• GenerateByteCodes() : OpenBabel
• GenerateDefaultBond() : OpenBabel
• GenerateElement() : OpenBabel
• GenerateSequence() : OpenBabel
• get_rmat() : OpenBabel
• get_roots_3_3() : OpenBabel
• GetAtomIDNumber() : OpenBabel
• GetBondExprIndex() : OpenBabel
• GetBondLeafIndex() : OpenBabel
• GetChiralFlag() : OpenBabel
• GetChirality() : OpenBabel
• GetCurrentValence() : OpenBabel
• GetDFFVector() : OpenBabel
• GetExprOrder() : OpenBabel
• GetGIVector() : OpenBabel
• GetGTDVector() : OpenBabel
• GetHvyBondSum() : OpenBabel
• GetHvyValence() : OpenBabel
• GetParity4Ref() : OpenBabel
• GetResidueNumber() : OpenBabel
• GetValence() : OpenBabel
• GetVectorBinding() : OpenBabel

-g- 1632
Open Babel: API Documentation

• GraphPotentials() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s

-g- 1633
Open Babel: API Documentation
•t
•u
•v
•w

-i-

• InternalToCartesian() : OpenBabel
• invert_matrix() : OpenBabel
• invert_matrix_f() : OpenBabel
• invert_matrix_ff() : OpenBabel
• InvertCase() : OpenBabel
• IsApprox() : OpenBabel
• IsApprox_pos() : OpenBabel
• IsBooleanAtomLeaf() : OpenBabel
• IsInvalidAtom() : OpenBabel
• IsNan() : OpenBabel
• IsNear() : OpenBabel
• IsNearZero() : OpenBabel
• IsNegatingAtomLeaf() : OpenBabel
• IsNegligible() : OpenBabel
• IsOddPrime() : OpenBabel
• isqrt() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

-i- 1634
Open Babel: API Documentation
• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-p-

• PackCoordinate() : OpenBabel
• ParseAtomExpr() : OpenBabel
• ParseBondExpr() : OpenBabel
• ParseBondPrimitive() : OpenBabel
• ParseComplexAtomPrimitive() : OpenBabel
• ParseSimpleAtomPrimitive() : OpenBabel
• ParseSMARTSError() : OpenBabel
• ParseSMARTSPart() : OpenBabel
• ParseSMARTSPattern() : OpenBabel
• ParseSMARTSRecord() : OpenBabel
• ParseSMARTSString() : OpenBabel
• Point2Plane() : OpenBabel
• Point2PlaneAngle() : OpenBabel
• print_matrix() : OpenBabel
• print_matrix_f() : OpenBabel
• print_matrix_ff() : OpenBabel

-p- 1635
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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u

-p- 1636
Open Babel: API Documentation

•v
•w

-q-

• qtrfit() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k

-q- 1637
Open Babel: API Documentation
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-r-

• RelativelyPrime() : OpenBabel
• Reweight() : OpenBabel
• rint() : OpenBabel
• rotate_coords() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables

-r- 1638
Open Babel: API Documentation
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-s-

• SafeOpen() : OpenBabel
• SetResidueKeys() : OpenBabel
• SetRotorToAngle() : OpenBabel
• SetupAtomMatchTable() : OpenBabel
• signed_volume() : OpenBabel
• SMARTSError() : OpenBabel
• SmartsLexReplace() : OpenBabel
• SMARTSParser() : OpenBabel
• SolveCubic() : OpenBabel
• SolveLinear() : OpenBabel
• SolveQuadratic() : OpenBabel
• SortAtomZ() : OpenBabel
• SortVVInt() : OpenBabel
• SQUARE() : OpenBabel
• superimpose() : OpenBabel
• Swab() : OpenBabel

-s- 1639
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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u

-s- 1640
Open Babel: API Documentation
•v
•w

-t-

• Tanimoto() : OpenBabel
• theOpCenter() : OpenBabel
• ThrowError() : OpenBabel
• tokenize() : OpenBabel
• ToLower() : OpenBabel
• Tolower() : OpenBabel
• ToLower() : OpenBabel
• ToUpper() : OpenBabel
• Toupper() : OpenBabel
• ToUpper() : OpenBabel
• TraverseSMARTS() : OpenBabel
• Trim() : OpenBabel
• trim_spaces() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs

-t- 1641
Open Babel: API Documentation
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-u-

• UnpackCoordinate() : OpenBabel

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:59 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

-u- 1642
Open Babel: API Documentation

• Classes
• Files

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u
•v
•w

-v-

• ValenceSum() : OpenBabel
• vectorAngle() : OpenBabel
• VX() : OpenBabel
• VY() : OpenBabel
• VZ() : OpenBabel
• VZero() : OpenBabel

-v- 1643
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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•a
•b
•c
•d
•e
•f
•g
•i
•k
•l
•m
•n
•o
•p
•q
•r
•s
•t
•u

-v- 1644
Open Babel: API Documentation

•v
•w

-w-

• WriteTitles() : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

• AtomExpr : OpenBabel
• BondExpr : OpenBabel
• ByteCode : OpenBabel
• Formatpos : OpenBabel
• OBAtomIterator : OpenBabel
• OBBondIterator : OpenBabel
• OBDataIterator : OpenBabel

-w- 1645
Open Babel: API Documentation
• OBEdgeBase : OpenBabel
• OBNodeBase : OpenBabel
• OBPairFloatingPoint : OpenBabel
• OBPairInteger : OpenBabel
• OBResidueIterator : OpenBabel
• OBRotorIterator : OpenBabel
• Template : OpenBabel
• transform3dIterator : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

• All
• Functions
• Variables
• Typedefs
• Enumerations
• Enumerator

•_
•a
•b
•c
•d
•e
•i
•l
•m
•n

-w- 1646
Open Babel: API Documentation
•o
•p
•r
•s
•t
•v

-_-

• _SpaceGroups : OpenBabel

-a-

• AliasDataType : OpenBabel
• AminoAcids : OpenBabel
• aromtyper : OpenBabel
• AtomIndex : OpenBabel
• atomtyper : OpenBabel

-b-

• bitsoff : OpenBabel
• BondIndex : OpenBabel
• bondtyper : OpenBabel
• Buffer : OpenBabel

-c-

• ChainsAtomName : OpenBabel
• chainsparser : OpenBabel

-d-

• Descr : OpenBabel

-e-

• ElemDesc : OpenBabel
• ElemNo : OpenBabel
• etab : OpenBabel

-i-

• isotab : OpenBabel

-_- 1647
Open Babel: API Documentation

-l-

• LexPtr : OpenBabel

-m-

• MainPtr : OpenBabel
• MonoAtom : OpenBabel
• MonoAtomCount : OpenBabel
• MonoBond : OpenBabel
• MonoBondCount : OpenBabel

-n-

• nibble_bit_count : OpenBabel
• Nucleotide : OpenBabel
• Nucleotides : OpenBabel

-o-

• obErrorLog : OpenBabel
• obLocale : OpenBabel

-p-

• Peptide : OpenBabel
• phmodel : OpenBabel
• PointGroups : OpenBabel
• primes : OpenBabel

-r-

• RateData : OpenBabel
• resdat : OpenBabel
• Residue : OpenBabel
• ResNo : OpenBabel
• ringtyper : OpenBabel
• Roots : OpenBabel
• RSCACHE : OpenBabel

-s-

• SINT : OpenBabel
• Stack : OpenBabel
• StackPtr : OpenBabel
• STPTR : OpenBabel
• StrictFlag : OpenBabel
• SwabInt : OpenBabel

-l- 1648
Open Babel: API Documentation

-t-

• ThermoData : OpenBabel
• ttab : OpenBabel

-v-

• VX : OpenBabel
• VY : OpenBabel
• VZ : OpenBabel
• VZero : OpenBabel

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:59 2008 by 1.5.6.

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

• Namespace List
• Namespace Members

-t- 1649
Namespace List
Here is a list of all namespaces with brief descriptions:

OpenBabel Global namespace for all Open Babel code


OpenBabel::OBAminoAcidProperty Residue property definitions
OpenBabel::OBGenericDataType Classification of data stored via OBGenericData class and subclasses
OpenBabel::OBResidueAtomProperty Residue atom properties
OpenBabel::OBResidueIndex Residue names (index into Residue[] array)
OpenBabel::OBResidueProperty Residue 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:55 2008 by 1.5.6.

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

Namespace List 1650


obconversion.cpp File Reference
Implementation of OBFormat and OBConversion classes. More...

#include <openbabel/babelconfig.h>
#include <iosfwd>
#include <fstream>
#include <sstream>
#include <string>
#include <map>
#include <locale>
#include <stdlib.h>
#include <openbabel/obconversion.h>
#include <openbabel/locale.h>

Namespaces
namespace OpenBabel

Defines
#define BUFF_SIZE 32768

Functions
int strncasecmp (const char *s1, const char *s2, size_t n)

Detailed Description
Implementation of OBFormat and OBConversion classes.

Define Documentation

#define BUFF_SIZE 32768

Function Documentation

int strncasecmp ( const char * s1,


const char * s2,
size_t n
)

obconversion.cpp File Reference 1651


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:53 2008 by 1.5.6.

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

Function Documentation 1652


obconversion.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 obconversion.h - Handle file conversions. Declaration of OBFormat, OBConversion
00003
00004 Copyright (C) 2004-2005 by Chris Morley
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_CONV_H
00020 #define OB_CONV_H
00021
00022 #include <openbabel/babelconfig.h>
00023
00024 #include <iostream>
00025 #include <fstream>
00026 #include <sstream>
00027
00028 #include <string>
00029 #include <vector>
00030 #include <map>
00031
00032 #include <openbabel/dlhandler.h>
00033 #include <openbabel/oberror.h>
00034 #include <openbabel/format.h>
00035 #include <openbabel/lineend.h>
00036
00037 // These macros are used in DLL builds. If they have not
00038 // been set in babelconfig.h, define them as nothing.
00039 #ifndef OBCONV
00040 #define OBCONV
00041 #endif
00042 #ifndef OBDLL
00043 #define OBDLL
00044 #endif
00045
00046 //using namespace std;
00047 namespace OpenBabel {
00048
00049 // Needed to preserve deprecated API
00050 typedef OBPlugin::PluginIterator Formatpos;
00051
00052 OBERROR extern OBMessageHandler obErrorLog;
00053
00054 //*************************************************
00056 // Class introduction in obconversion.cpp

obconversion.h 1653
Open Babel: API Documentation
00057 class OBCONV OBConversion
00058 {
00060 public:
00062
00063 OBConversion(std::istream* is=NULL, std::ostream* os=NULL);
00065 OBConversion(const OBConversion& o);
00066 virtual ~OBConversion();
00068
00069
00070
00071 static int RegisterFormat(const char* ID, OBFormat* p
00073 static OBFormat* FindFormat(const char* ID);
00075 static OBFormat* FormatFromExt(const char* filename);
00077 static OBFormat* FormatFromMIME(const char* MIME);
00078
00080 static bool GetNextFormat(Formatpos& itr, const char*& str,OBFormat*&
00082
00084
00085 static const char* Description(); //generic conversion options
00087
00089
00090 std::istream* GetInStream() const {return pInStream;};
00091 std::ostream* GetOutStream() const {return pOutStream;};
00092 void SetInStream(std::istream* pIn)
00093 {
00094 if (pInStream && NeedToFreeInStream) {
00095 delete pInStream; NeedToFreeInStream = false;
00096 }
00097 pInStream=pIn;
00098 CheckedForGzip = false; // haven't tried to gzip decode this stream
00099 };
00100 void SetOutStream(std::ostream* pOut)
00101 {
00102 if (pOutStream && NeedToFreeOutStream) {
00103 delete pOutStream; NeedToFreeOutStream = false;
00104 }
00105 pOutStream=pOut;
00106 };
00108 bool SetInAndOutFormats(const char* inID, const char* outID);
00109 bool SetInAndOutFormats(OBFormat* pIn, OBFormat* pOut);
00111 bool SetInFormat(const char* inID);
00112 bool SetInFormat(OBFormat* pIn);
00114 bool SetOutFormat(const char* outID);
00115 bool SetOutFormat(OBFormat* pOut);
00116
00117 OBFormat* GetInFormat() const{return pInFormat;};
00118 OBFormat* GetOutFormat() const{return pOutFormat;};
00119 std::string GetInFilename() const{return InFilename;};
00120
00122 std::streampos GetInPos()const{return wInpos;};
00123
00125 size_t GetInLen()const{return wInlen;};
00126
00128 const char* GetTitle() const;
00129
00131 OBConversion* GetAuxConv() const {return pAuxConv;};
00132 void SetAuxConv(OBConversion* pConv) {pAuxConv=pConv;};
00134
00135
00136
00137 enum Option_type { INOPTIONS, OUTOPTIONS, GENOPTIONS, ALL };

obconversion.h 1654
Open Babel: API Documentation
00138
00140 const char* IsOption(const char* opt,Option_type opttyp=OUTOPTIONS);
00141
00143 const std::map<std::string,std::string>* GetOptions(Option_type opttyp)
00144 { return &OptionsArray[opttyp];};
00145
00147 void AddOption(const char* opt, Option_type opttyp=OUTOPTIONS, const char* txt=NULL)
00148
00149 bool RemoveOption(const char* opt, Option_type optype);
00150
00152 void SetOptions(const char* options, Option_type opttyp);
00153
00155 static void RegisterOptionParam(std::string name, OBFormat* pFormat,
00156 int numberParams=0, Option_type typ=OUTOPTIONS);
00157
00159 static int GetOptionParams(std::string name, Option_type typ);
00161
00163 void CopyOptions(OBConversion* pSourceConv, Option_type typ=ALL);
00164
00166
00167 // @brief Set and return the list of supported input format
00168 std::vector<std::string> GetSupportedInputFormat();
00169 // @brief Set and return the list of supported output format
00170 std::vector<std::string> GetSupportedOutputFormat();
00172
00174
00175
00176 int Convert(std::istream* is, std::ostream* os);
00177
00179 int Convert();
00180
00183 int FullConvert(std::vector<std::string>& Fil
00184 std::string& OutputFileName, std::vector<std::string>& Outp
00186
00188
00189 int AddChemObject(OBBase* pOb);
00190 OBBase* GetChemObject();
00191 bool IsLast();
00192 bool IsFirstInput();
00193 void SetFirstInput(bool b=true);
00194 int GetOutputIndex() const ;
00195 void SetOutputIndex(int indx);
00196 void SetMoreFilesToCome();
00197 void SetOneObjectOnly(bool b=true);
00198 void SetLast(bool b){SetOneObjectOnly(b);}
00199 bool IsLastFile(){ return !MoreFilesToCome;}
00200
00201
00202
00203
00204 static OBFormat* GetDefaultFormat(){return OBFormat::FindType(NULL);};
00205
00207
00210 bool Write(OBBase* pOb, std::ostream* pout=NULL);
00211
00213
00219 std::string WriteString(OBBase* pOb, bool trimWhitespace = fals
00220
00222
00227 bool WriteFile(OBBase* pOb, std::string filePath);
00228

obconversion.h 1655
Open Babel: API Documentation
00233 void CloseOutFile();
00234
00236
00240 bool Read(OBBase* pOb, std::istream* pin=NULL);
00241
00245 // OBBase* ReadObject(std::istream* pin=NULL);
00246
00248
00252 bool ReadString(OBBase* pOb, std::string input);
00253
00255
00261 bool ReadFile(OBBase* pOb, std::string filePath);
00262
00268 bool OpenInAndOutFiles(std::string infilepath, std::string outfilepath);
00269
00274 void ReportNumberConverted(int count, OBFormat* pFormat=NULL);
00275
00276
00277 protected:
00279 static std::string BatchFileName(std::string& BaseName, std::string& InFile);
00281 static std::string IncrementedFileName(std::string& BaseName, const int Count);
00283 static bool CheckForUnintendedBatch(const std::string& infile, const std::string& o
00285 void InstallStreamFilter();
00286
00288
00289 protected:
00290 bool SetStartAndEnd();
00291 // static FMapType& FormatsMap();///<contains ID and pointer to all OBFormat classes
00292 // static FMapType& FormatsMIMEMap();///<contains MIME and pointer to all OBFormat c
00293 typedef std::map<std::string,int> OPAMapType;
00294 static OPAMapType& OptionParamArray(Option_type typ);
00295 static int LoadFormatFiles();
00296 bool OpenAndSetFormat(bool SetFormat, std::ifstream* is);
00297
00298 std::string InFilename;
00299 std::istream* pInStream;
00300 std::ostream* pOutStream;
00301 static OBFormat* pDefaultFormat;
00302 OBFormat* pInFormat;
00303 OBFormat* pOutFormat;
00304
00305 std::map<std::string,std::string> OptionsArray[3];
00306
00307 int Index;
00308 unsigned int StartNumber;
00309 unsigned int EndNumber;
00310 int Count;
00311 bool m_IsFirstInput;
00312 bool m_IsLast;
00313 bool MoreFilesToCome;
00314 bool OneObjectOnly;
00315 bool ReadyToInput;
00316 bool CheckedForGzip;
00317 bool NeedToFreeInStream;
00318 bool NeedToFreeOutStream;
00319 typedef FilteringInputStreambuf< LineEndingExtractor > LErdbuf;
00320 LErdbuf* pLineEndBuf;
00321
00322 static int FormatFilesLoaded;
00323 OBBase* pOb1;
00324 std::streampos wInpos;

obconversion.h 1656
Open Babel: API Documentation
00325 std::streampos rInpos;
00326 size_t wInlen;
00327 size_t rInlen;
00328
00329 OBConversion* pAuxConv;
00330
00331 std::vector<std::string> SupportedInputFormat;
00332 std::vector<std::string> SupportedOutputFormat;
00333
00334 };
00335
00336 } //namespace OpenBabel
00337 #endif //OB_CONV_H
00338
00341
00342

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

obconversion.h 1657
obconversion.h File Reference
Handle file conversions. Declaration of OBFormat, OBConversion. More...

#include <openbabel/babelconfig.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <openbabel/dlhandler.h>
#include <openbabel/oberror.h>
#include <openbabel/format.h>
#include <openbabel/lineend.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 OBConversion
Class to convert from one format to another. More...

Typedefs
typedef OBPlugin::PluginIterator Formatpos

obconversion.h File Reference 1658


Open Babel: API Documentation

Detailed Description
Handle file conversions. Declaration of OBFormat, OBConversion.

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:53 2008 by 1.5.6.

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

Detailed Description 1659


oberror.cpp File Reference
Handle error messages, warnings, notices, etc. Implements OBMessageHandler class. More...

#include <openbabel/babelconfig.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <openbabel/oberror.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle error messages, warnings, notices, etc. Implements OBMessageHandler 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:53 2008 by 1.5.6.

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

oberror.cpp File Reference 1660


oberror.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 oberror.h - Handle error messages, warnings, notices, etc.
00003
00004 Copyright (C) 2002 by Stefan Kebekus
00005 Some portions Copyright (C) 2003-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, but
00015 WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017 General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_ERROR_H
00021 #define OB_ERROR_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <iosfwd>
00026 #include <sstream>
00027 #include <string>
00028 #include <vector>
00029 #include <deque>
00030
00031 #ifndef OBERROR
00032 #define OBERROR
00033 #endif
00034
00035 namespace OpenBabel
00036 {
00037
00039 enum obMessageLevel {
00040 obError,
00041 obWarning,
00042 obInfo,
00043 obAuditMsg,
00044 obDebug
00045 };
00046
00047 enum errorQualifier {always, onceOnly};
00048
00052 class OBERROR OBError
00053 {
00054 public:
00055
00057 OBError( const std::string &method = "",
00058 const std::string &errorMsg = "",
00059 const std::string &explanation = "",
00060 const std::string &possibleCause = "",

oberror.h 1661
Open Babel: API Documentation
00061 const std::string &suggestedRemedy = "",
00062 const obMessageLevel = obDebug );
00063
00065 std::string message(void) const;
00066
00068 friend std::ostream& operator<< ( std::ostream &os, const OBError &er )
00069 { return os << er.message(); };
00070
00073 std::string GetMethod() const { return _method; }
00075 std::string GetError() const { return _errorMsg; }
00077 std::string GetExplanation() const { return _explanation; }
00079 std::string GetPossibleCause() const { return _possibleCause; }
00081 std::string GetSuggestedRemedy() const { return _suggestedRemedy; }
00083 obMessageLevel GetLevel() const { return _level; }
00084
00085 bool operator== (const OBError&)const;
00086
00087 protected:
00088
00090 std::string _method;
00092 std::string _errorMsg;
00094 std::string _explanation;
00096 std::string _possibleCause;
00098 std::string _suggestedRemedy;
00099
00101 obMessageLevel _level;
00102 };
00103
00105 // More documentation in oberror.cpp
00106 class OBERROR OBMessageHandler
00107 {
00108 protected:
00110 unsigned int _messageCount[5];
00111
00112 public:
00113 OBMessageHandler();
00114 ~OBMessageHandler();
00115
00117 void ThrowError(OBError err, errorQualifier qqualifier = always);
00119 void ThrowError(const std::string &method, const std::string &errorMsg,
00120 obMessageLevel level = obDebug, errorQualifier qualifier = always);
00121
00123 std::vector<std::string> GetMessagesOfLevel(const obMessageLevel);
00124
00126 void StartLogging() { _logging = true; }
00128 void StopLogging() { _logging = false; }
00129
00131 void SetMaxLogEntries(unsigned int max) { _maxEntries = max; }
00133 unsigned int GetMaxLogEntries() { return _maxEntries; }
00134
00136 void ClearLog() { _messageList.clear(); }
00137
00140 void SetOutputLevel(const obMessageLevel level) { _outputLevel = level; }
00142 obMessageLevel GetOutputLevel() { return _outputLevel; }
00143
00144 void SetOutputStream(std::ostream *os) { _outputStream = os; }
00145 std::ostream* GetOutputStream() { return _outputStream; }
00146
00148 bool StartErrorWrap();
00150 bool StopErrorWrap();
00151

oberror.h 1662
Open Babel: API Documentation
00153 unsigned int GetErrorMessageCount() { return _messageCount[obError];}
00155 unsigned int GetWarningMessageCount() { return _messageCount[obWarning];}
00157 unsigned int GetInfoMessageCount() { return _messageCount[obInfo];}
00159 unsigned int GetAuditMessageCount() { return _messageCount[obAuditMsg];}
00161 unsigned int GetDebugMessageCount() { return _messageCount[obDebug];}
00163 std::string GetMessageSummary();
00164
00165 protected:
00167 std::deque<OBError> _messageList;
00168
00170 obMessageLevel _outputLevel;
00171
00172 // self-explanatory
00173 std::ostream *_outputStream;
00174
00176 bool _logging;
00178 unsigned int _maxEntries;
00179
00181 std::streambuf *_inWrapStreamBuf;
00183 std::streambuf *_filterStreamBuf;
00184 };
00185
00186 OBERROR extern OBMessageHandler obErrorLog;
00187
00190
00200 class OBERROR obLogBuf : public std::stringbuf
00201 {
00202 public:
00204 virtual ~obLogBuf() { sync(); }
00205
00206 protected:
00208 int sync()
00209 {
00210 obErrorLog.ThrowError("", str(), obInfo);
00211 str(std::string()); // clear the buffer
00212 return 0;
00213 }
00214 };
00215
00216 } // end namespace OpenBabel
00217
00218 #endif
00219

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:

oberror.h 1663
Open Babel: API Documentation

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

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

oberror.h 1664
oberror.h File Reference
Handle error messages, warnings, notices, etc. More...

#include <openbabel/babelconfig.h>
#include <iosfwd>
#include <sstream>
#include <string>
#include <vector>
#include <deque>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBError
Customizable error handling and logging -- store a message, including the method yielding the
error, causes, etc. More...
class OBMessageHandler
Handle error messages, warnings, debugging information and the like. More...
class obLogBuf
A minimal streambuf derivative to wrap calls to cerr into calls to OBMessageHandler as needed.
More...

oberror.h File Reference 1665


Open Babel: API Documentation

Enumerations
enum obMessageLevel {
obError, obWarning, obInfo, obAuditMsg,
obDebug
}
enum errorQualifier { always, onceOnly }

Detailed Description
Handle error messages, warnings, notices, etc.

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:53 2008 by 1.5.6.

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

Enumerations 1666
obiter.cpp File Reference
STL-style iterators for Open Babel. More...

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

Namespaces
namespace OpenBabel

Detailed Description
STL-style iterators for Open Babel.

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:53 2008 by 1.5.6.

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

obiter.cpp File Reference 1667


obiter.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 obiter.h - STL-style iterators for Open Babel.
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_OBITER_H
00021 #define OB_OBITER_H
00022
00023 #include <openbabel/babelconfig.h>
00024 #include <openbabel/base.h>
00025 #include <openbabel/bitvec.h>
00026
00027 #include <vector>
00028 #include <stack>
00029 #include <queue>
00030
00031 namespace OpenBabel
00032 {
00033
00034 class OBMol;
00035 class OBAtom;
00036 class OBBond;
00037 class OBResidue;
00038
00039 // more detailed descriptions and documentation in obiter.cpp
00040
00042 class OBAPI OBMolAtomIter {
00043 std::vector<OBAtom*>::iterator _i;
00044 OBMol *_parent;
00045 OBAtom *_ptr;
00046 public:
00047
00048 OBMolAtomIter() :_parent(NULL), _ptr(NULL) { }
00049 OBMolAtomIter(OBMol *mol);
00050 OBMolAtomIter(OBMol &mol);
00051 OBMolAtomIter(const OBMolAtomIter &ai);
00052 ~OBMolAtomIter() { }
00053
00054 OBMolAtomIter& operator=(const OBMolAtomIter &ai);
00056 operator bool() const { return _ptr != NULL; }
00058 OBMolAtomIter& operator++();

obiter.h 1668
Open Babel: API Documentation
00060 OBMolAtomIter operator++(int);
00062 OBAtom* operator->() const { return _ptr; }
00064 OBAtom& operator*() const { return *_ptr; }
00065 };
00066
00068 class OBAPI OBMolAtomDFSIter {
00069 OBMol *_parent;
00070 OBAtom *_ptr;
00071 OBBitVec _notVisited;
00072 std::stack<OBAtom *> _stack;
00073 public:
00074
00075 OBMolAtomDFSIter() : _parent(NULL), _ptr(NULL) { }
00076 OBMolAtomDFSIter(OBMol *mol, int StartIndex=1);
00077 OBMolAtomDFSIter(OBMol &mol, int StartIndex=1);
00078 OBMolAtomDFSIter(const OBMolAtomDFSIter &ai);
00079 ~OBMolAtomDFSIter() { }
00080
00081 OBMolAtomDFSIter& operator=(const OBMolAtomDFSIter &ai);
00083 operator bool() const { return _ptr != NULL; }
00085 OBMolAtomDFSIter& operator++();
00087 OBMolAtomDFSIter operator++(int);
00089 OBAtom* operator->() const { return _ptr; }
00091 OBAtom& operator*() const { return *_ptr; }
00093 OBAtom* next()
00094 {
00095 if(_stack.empty())
00096 return NULL; //end of a disconnected fragment
00097 else
00098 return _stack.top(); //the next atom
00099 }
00100 };
00101
00103 class OBAPI OBMolAtomBFSIter {
00104 OBMol *_parent;
00105 OBAtom *_ptr;
00106 OBBitVec _notVisited;
00107 std::queue<OBAtom *> _queue;
00108 std::vector<int> _depth;
00109 public:
00110
00111 OBMolAtomBFSIter(): _parent(NULL), _ptr(NULL) { }
00112 OBMolAtomBFSIter(OBMol *mol, int StartIndex = 1);
00113 OBMolAtomBFSIter(OBMol &mol, int StartIndex = 1);
00114 OBMolAtomBFSIter(const OBMolAtomBFSIter &ai);
00115 ~OBMolAtomBFSIter() { }
00116
00117 OBMolAtomBFSIter& operator=(const OBMolAtomBFSIter &ai);
00119 operator bool() const { return _ptr != NULL; }
00121 OBMolAtomBFSIter& operator++();
00123 OBMolAtomBFSIter operator++(int);
00125 OBAtom* operator->() const { return _ptr; }
00127 OBAtom& operator*() const { return *_ptr; }
00130 int CurrentDepth() const;
00131 };
00132
00134 class OBAPI OBMolBondIter {
00135 std::vector<OBBond*>::iterator _i;
00136 OBMol *_parent;
00137 OBBond *_ptr;
00138 public:

obiter.h 1669
Open Babel: API Documentation
00139
00140 OBMolBondIter() : _parent(NULL), _ptr(NULL) {}
00141 OBMolBondIter(OBMol *mol);
00142 OBMolBondIter(OBMol &mol);
00143 OBMolBondIter(const OBMolBondIter &bi);
00144 ~OBMolBondIter() { }
00145
00146 OBMolBondIter& operator=(const OBMolBondIter &bi);
00148 operator bool() const { return _ptr != NULL; }
00150 OBMolBondIter& operator++();
00152 OBMolBondIter operator++(int);
00154 OBBond* operator->() const { return _ptr; }
00156 OBBond& operator*() const { return *_ptr; }
00157 };
00158
00160 class OBAPI OBAtomAtomIter {
00161 std::vector<OBBond*>::iterator _i;
00162 OBAtom *_parent;
00163 OBAtom *_ptr;
00164 public:
00165
00166 OBAtomAtomIter() : _parent(NULL), _ptr(NULL) { }
00167 OBAtomAtomIter(OBAtom *atm);
00168 OBAtomAtomIter(OBAtom &atm);
00169 OBAtomAtomIter(const OBAtomAtomIter &ai);
00170 ~OBAtomAtomIter() { }
00171
00172 OBAtomAtomIter& operator=(const OBAtomAtomIter &ai);
00174 operator bool() const { return _ptr != NULL; }
00176 OBAtomAtomIter& operator++();
00178 OBAtomAtomIter operator++(int);
00180 OBAtom* operator->() const { return _ptr; }
00182 OBAtom& operator*() const { return *_ptr; }
00183 };
00184
00186 class OBAPI OBAtomBondIter {
00187 std::vector<OBBond*>::iterator _i;
00188 OBAtom *_parent;
00189 OBBond *_ptr;
00190 public:
00191
00192 OBAtomBondIter(): _parent(NULL), _ptr(NULL) { }
00193 OBAtomBondIter(OBAtom *atm);
00194 OBAtomBondIter(OBAtom &atm);
00195 OBAtomBondIter(const OBAtomBondIter &bi);
00196 ~OBAtomBondIter() { }
00197
00198 OBAtomBondIter& operator=(const OBAtomBondIter &bi);
00200 operator bool() const { return _ptr != NULL; }
00202 OBAtomBondIter& operator++();
00204 OBAtomBondIter operator++(int);
00206 OBBond* operator->() const { return _ptr; }
00208 OBBond& operator*() const { return *_ptr;}
00209 };
00210
00212 class OBAPI OBResidueIter {
00213 std::vector<OBResidue*>::iterator _i;
00214 OBResidue *_ptr;
00215 OBMol *_parent;
00216 public:
00217

obiter.h 1670
Open Babel: API Documentation
00218 OBResidueIter() : _ptr(NULL), _parent(NULL) { }
00219 OBResidueIter(OBMol *mol);
00220 OBResidueIter(OBMol &mol);
00221 OBResidueIter(const OBResidueIter &ri);
00222 ~OBResidueIter() { }
00223
00224 OBResidueIter& operator=(const OBResidueIter &ri);
00226 operator bool() const { return _ptr != NULL; }
00228 OBResidueIter& operator++();
00230 OBResidueIter operator++(int);
00232 OBResidue* operator->() const{ return _ptr; }
00234 OBResidue& operator*() const { return *_ptr;}
00235 };
00236
00238 class OBAPI OBResidueAtomIter {
00239 std::vector<OBAtom*>::iterator _i;
00240 OBResidue *_parent;
00241 OBAtom *_ptr;
00242 public:
00243
00244 OBResidueAtomIter() : _parent(NULL), _ptr(NULL) { }
00245 OBResidueAtomIter(OBResidue *res);
00246 OBResidueAtomIter(OBResidue &res);
00247 OBResidueAtomIter(const OBResidueAtomIter &ri);
00248 ~OBResidueAtomIter() { }
00249
00250 OBResidueAtomIter &operator = (const OBResidueAtomIter &ri);
00252 operator bool() const { return _ptr != NULL; }
00254 OBResidueAtomIter& operator++ ();
00256 OBResidueAtomIter operator++ (int);
00258 OBAtom *operator->() const { return _ptr; }
00260 OBAtom &operator*() const { return *_ptr;}
00261 };
00262
00264 class OBAPI OBMolAngleIter {
00265 OBMol *_parent;
00266 std::vector<std::vector<unsigned int> > _vangle;
00267 std::vector<std::vector<unsigned int> >::iterator _i;
00268 std::vector<unsigned int> _angle;
00269 public:
00270
00271 OBMolAngleIter() :_parent(NULL) { }
00272 OBMolAngleIter(OBMol *mol);
00273 OBMolAngleIter(OBMol &mol);
00274 OBMolAngleIter(const OBMolAngleIter &ai);
00275 ~OBMolAngleIter() { }
00276
00277 OBMolAngleIter& operator=(const OBMolAngleIter &ai);
00279 operator bool() const { return (_i != _vangle.end()); }
00281 OBMolAngleIter& operator++();
00284 std::vector<unsigned int> operator*() const { return _angle; }
00285 };
00286
00288 class OBAPI OBMolTorsionIter {
00289 OBMol *_parent;
00290 std::vector<std::vector<unsigned int> > _vtorsion;
00291 std::vector<std::vector<unsigned int> >::iterator _i;
00292 std::vector<unsigned int> _torsion;
00293 public:
00294
00295 OBMolTorsionIter() :_parent(NULL) { }

obiter.h 1671
Open Babel: API Documentation
00296 OBMolTorsionIter(OBMol *mol);
00297 OBMolTorsionIter(OBMol &mol);
00298 OBMolTorsionIter(const OBMolTorsionIter &ai);
00299 ~OBMolTorsionIter() { }
00300
00301 OBMolTorsionIter& operator=(const OBMolTorsionIter &ai);
00303 operator bool() const { return (_i != _vtorsion.end()); }
00305 OBMolTorsionIter& operator++();
00308 std::vector<unsigned int> operator*() const { return _torsion; }
00309 };
00310
00312 class OBAPI OBMolPairIter {
00313 std::vector<OBAtom*>::iterator _i;
00314 std::vector<OBAtom*>::iterator _j;
00315 OBMol *_parent;
00316 //std::vector<std::vector<unsigned int> > _vpair;
00317 //std::vector<std::vector<unsigned int> >::iterator _i;
00318 std::vector<unsigned int> _pair;
00319
00320 public:
00321
00322 OBMolPairIter() :_parent(NULL) { }
00323 OBMolPairIter(OBMol *mol);
00324 OBMolPairIter(OBMol &mol);
00325 OBMolPairIter(const OBMolPairIter &ai);
00326 ~OBMolPairIter() { }
00327
00328 OBMolPairIter& operator=(const OBMolPairIter &ai);
00330 operator bool() const { return _pair.size()>0; }
00332 OBMolPairIter& operator++();
00335 std::vector<unsigned int> operator*() const { return _pair; }
00336 };
00337
00338
00340 class OBAPI OBMolRingIter {
00341 std::vector<OBRing*>::iterator _i;
00342 OBRing *_ptr;
00343 OBMol *_parent;
00344 OBRingData *_rings;
00345 public:
00346
00347 OBMolRingIter() : _ptr(NULL), _parent(NULL), _rings(NULL) { }
00348 OBMolRingIter(OBMol *mol);
00349 OBMolRingIter(OBMol &mol);
00350 OBMolRingIter(const OBMolRingIter &ri);
00351 ~OBMolRingIter() { }
00352
00353 OBMolRingIter& operator=(const OBMolRingIter &ri);
00355 operator bool() const { return _ptr != NULL; }
00357 OBMolRingIter& operator++();
00359 OBMolRingIter operator++(int);
00361 OBRing* operator->() const { return _ptr; }
00363 OBRing& operator*() const { return *_ptr;}
00364 };
00365
00366 #define FOR_ATOMS_OF_MOL(a,m) for( OBMolAtomIter a(m); a; ++a )
00367 #define FOR_BONDS_OF_MOL(b,m) for( OBMolBondIter b(m); b; ++b )
00368 #define FOR_NBORS_OF_ATOM(a,p) for( OBAtomAtomIter a(p); a; ++a )
00369 #define FOR_BONDS_OF_ATOM(b,p) for( OBAtomBondIter b(p); b; ++b )
00370 #define FOR_RESIDUES_OF_MOL(r,m) for( OBResidueIter r(m); r; ++r )
00371 #define FOR_ATOMS_OF_RESIDUE(a,r) for( OBResidueAtomIter a(r); a; ++a )

obiter.h 1672
Open Babel: API Documentation
00372 #define FOR_DFS_OF_MOL(a,m) for( OBMolAtomDFSIter a(m); a; ++a )
00373 #define FOR_BFS_OF_MOL(a,m) for( OBMolAtomBFSIter a(m); a; ++a )
00374 #define FOR_RINGS_OF_MOL(a,m) for( OBMolRingIter r(m); r; ++r )
00375 #define FOR_ANGLES_OF_MOL(a,m) for( OBMolAngleIter a(m); a; ++a )
00376 #define FOR_TORSIONS_OF_MOL(t,m) for( OBMolTorsionIter t(m); t; ++t )
00377 #define FOR_PAIRS_OF_MOL(p,m) for( OBMolPairIter p(m); p; ++p )
00378
00379 } // namespace OpenBabel
00380 #endif // OB_OBITER_H
00381

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

obiter.h 1673
obiter.h File Reference
STL-style iterators for Open Babel. More...

#include <openbabel/babelconfig.h>
#include <openbabel/base.h>
#include <openbabel/bitvec.h>
#include <vector>
#include <stack>
#include <queue>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBMolAtomIter
Iterate over all atoms in an OBMol. More...
class OBMolAtomDFSIter
Iterate over all atoms in an OBMol in a depth-first search (DFS). More...
class OBMolAtomBFSIter
Iterate over all atoms in an OBMol in a breadth-first search (BFS). More...
class OBMolBondIter
Iterate over all bonds in an OBMol. More...
class OBAtomAtomIter
Iterate over all neighboring atoms to an OBAtom. More...
class OBAtomBondIter
Iterate over all bonds on an OBAtom. More...
class OBResidueIter

obiter.h File Reference 1674


Open Babel: API Documentation

Iterate over all residues in an OBMol. More...


class OBResidueAtomIter
Iterate over all atoms in an OBResidue. More...
class OBMolAngleIter
Iterate over all angles in an OBMol. More...
class OBMolTorsionIter
Iterate over all torsions in an OBMol. More...
class OBMolPairIter
Iterate over all pairs of atoms (>1-4) in an OBMol. More...
class OBMolRingIter
Iterate over all rings in an OBMol. More...

Defines
#define FOR_ATOMS_OF_MOL(a, m) for( OBMolAtomIter a(m); a; ++a )
#define FOR_BONDS_OF_MOL(b, m) for( OBMolBondIter b(m); b; ++b )
#define FOR_NBORS_OF_ATOM(a, p) for( OBAtomAtomIter a(p); a; ++a )
#define FOR_BONDS_OF_ATOM(b, p) for( OBAtomBondIter b(p); b; ++b )
#define FOR_RESIDUES_OF_MOL(r, m) for( OBResidueIter r(m); r; ++r )
#define FOR_ATOMS_OF_RESIDUE(a, r) for( OBResidueAtomIter a(r); a; ++a )
#define FOR_DFS_OF_MOL(a, m) for( OBMolAtomDFSIter a(m); a; ++a )
#define FOR_BFS_OF_MOL(a, m) for( OBMolAtomBFSIter a(m); a; ++a )
#define FOR_RINGS_OF_MOL(a, m) for( OBMolRingIter r(m); r; ++r )
#define FOR_ANGLES_OF_MOL(a, m) for( OBMolAngleIter a(m); a; ++a )
#define FOR_TORSIONS_OF_MOL(t, m) for( OBMolTorsionIter t(m); t; ++t )
#define FOR_PAIRS_OF_MOL(p, m) for( OBMolPairIter p(m); p; ++p )

Detailed Description
STL-style iterators for Open Babel.

Define Documentation

#define FOR_ATOMS_OF_MOL ( a,
for( OBMolAtomIter
m )
a(m); a; ++a )

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBAtomTyper::CorrectAromaticNitrogens(),
OBBuilder::CorrectStereoAtoms(), OBForceField::CorrectVelocities(), OBForceField::DetectExplosion(),
OBForceField::DistanceGeometry(), OBUnitCell::FillUnitCell(), OBMol::FindAngles(),
OBForceField::GenerateVelocities(), OBForceField::GetAtomTypes(), OBForceField::GetCoordinates(),
OBForceField::GetGrid(), OBForceField::GetPartialCharges(), OBMol::GetSpacedFormula(),
OBForceField::IsSetupNeeded(), OBForceField::MolecularDynamicsTakeNSteps(), OBMol::operator=(),
OBChainsParser::PerceiveChains(), OBForceField::PrintFormalCharges(),
OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(), OBForceField::PrintVelocities(),
OBForceField::SetConformers(), OBForceField::SetCoordinates(), and

Classes 1675
Open Babel: API Documentation

OBForceField::SteepestDescentTakeNSteps().

#define FOR_BONDS_OF_MOL ( b,
for( OBMolBondIter
m )
b(m); b; ++b )

Referenced by OBForceField::DetectExplosion(), OpenBabel::FixCisTransBonds(),


OBMol::GetNextFragment(), and OBMol::NewPerceiveKekuleBonds().

#define FOR_NBORS_OF_ATOM ( a,
for(
p ) OBAtomAtomIter a(p);
a; ++a )

Referenced by OBBuilder::AddNbrs(), OpenBabel::BreakChiralTies(), OBBuilder::Build(),


OBForceField::DistanceGeometry(), OBMol::FindAngles(), OBBuilder::GetNewBondVector(), and
OBChainsParser::PerceiveChains().

#define FOR_BONDS_OF_ATOM ( b,
p ) for( OBAtomBondIter b(p); b; ++b )

Referenced by OBBuilder::CorrectStereoBonds(), OBMol::FindChildren(),


OpenBabel::FindConjugatedEZBonds(), and OpenBabel::FixCisTransBonds().

#define FOR_RESIDUES_OF_MOL ( r,
m ) for( OBResidueIter r(m); r; ++r )

#define FOR_ATOMS_OF_RESIDUE ( a,
r ) for( OBResidueAtomIter a(r); a; ++a )

Referenced by OBMol::operator+=().

#define FOR_DFS_OF_MOL ( a,
m ) for( OBMolAtomDFSIter a(m); a; ++a )

Referenced by OBBuilder::Build().

#define FOR_BFS_OF_MOL ( a,
m ) for( OBMolAtomBFSIter a(m); a; ++a )

Define Documentation 1676


Open Babel: API Documentation

#define FOR_RINGS_OF_MOL ( a,
m ) for( OBMolRingIter r(m); r; ++r )

#define FOR_ANGLES_OF_MOL ( a,
m ) for( OBMolAngleIter a(m); a; ++a )

#define FOR_TORSIONS_OF_MOL ( t,
m ) for( OBMolTorsionIter t(m); t; ++t )

Referenced by OBBuilder::CorrectStereoBonds().

#define FOR_PAIRS_OF_MOL ( p,
m ) for( OBMolPairIter p(m); p; ++p )

Referenced by OBForceField::GetNumPairs(), and OBForceField::UpdatePairsSimple().

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:53 2008 by 1.5.6.

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

Define Documentation 1677


obmolecformat.cpp File Reference
Subclass of OBFormat for conversion of OBMol. More...

#include <openbabel/babelconfig.h>
#include <openbabel/obmolecformat.h>
#include <openbabel/obiter.h>

Namespaces
namespace OpenBabel

Detailed Description
Subclass of OBFormat for conversion of OBMol.

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:53 2008 by 1.5.6.

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

obmolecformat.cpp File Reference 1678


obmolecformat.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 obmolecformat.h - Subclass of OBFormat for conversion of OBMol.
00003
00004 Copyright (C) 2005 Chris Morley
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_MOLECULEFORMAT_H
00020 #define OB_MOLECULEFORMAT_H
00021
00022 #ifdef _MSC_VER
00023 #include <hash_map>
00024 #endif
00025
00026 #include <openbabel/mol.h>
00027 #include <openbabel/babelconfig.h>
00028 #include <openbabel/obconversion.h>
00029 #include <typeinfo>
00030
00031 namespace OpenBabel {
00032
00033 // This macro is used in DLL builds. If it has not
00034 // been set in babelconfig.h, define it as nothing.
00035 #ifndef OBCOMMON
00036 #define OBCOMMON
00037 #endif
00038
00052 class OBCOMMON OBMoleculeFormat : public OBFormat
00053 {
00054 private:
00055 static bool OptionsRegistered;
00056 static std::map<std::string, OBMol*> IMols;
00057 static OBMol* _jmol;
00058 static std::vector<OBMol> MolArray;
00059 static bool StoredMolsReady;
00060
00061 public:
00062
00063 OBMoleculeFormat()
00064 {
00065 if(!OptionsRegistered)
00066 {
00067 OptionsRegistered=true;
00068 OBConversion::RegisterOptionParam("b", this, 0, OBConversion::INOPTIONS);

obmolecformat.h 1679
Open Babel: API Documentation
00069 OBConversion::RegisterOptionParam("s", this, 0, OBConversion::INOPTIONS);
00070 OBConversion::RegisterOptionParam("title", this, 1,OBConversion::GENOPTIONS);
00071 OBConversion::RegisterOptionParam("addtotitle", this, 1,OBConversion::GENOPTIONS);
00072 OBConversion::RegisterOptionParam("property", this, 2, OBConversion::GENOPTIONS);
00073 OBConversion::RegisterOptionParam("C", this, 0,OBConversion::GENOPTIONS);
00074 OBConversion::RegisterOptionParam("j", this, 0,OBConversion::GENOPTIONS);
00075 OBConversion::RegisterOptionParam("join", this, 0,OBConversion::GENOPTIONS);
00076 OBConversion::RegisterOptionParam("separate", this, 0,OBConversion::GENOPTIONS);
00077
00078 //The follow are OBMol options, which should not be in OBConversion.
00079 //But here isn't entirely appropriate either, since one could have
00080 //OBMol formats loaded but which don't derived from this class.
00081 //However, this possibility is remote.
00082 OBConversion::RegisterOptionParam("s", NULL, 1,OBConversion::GENOPTIONS);
00083 OBConversion::RegisterOptionParam("v", NULL, 1,OBConversion::GENOPTIONS);
00084 OBConversion::RegisterOptionParam("h", NULL, 0,OBConversion::GENOPTIONS);
00085 OBConversion::RegisterOptionParam("d", NULL, 0,OBConversion::GENOPTIONS);
00086 OBConversion::RegisterOptionParam("b", NULL, 0,OBConversion::GENOPTIONS);
00087 OBConversion::RegisterOptionParam("c", NULL, 0,OBConversion::GENOPTIONS);
00088 OBConversion::RegisterOptionParam("p", NULL, 0,OBConversion::GENOPTIONS);
00089 OBConversion::RegisterOptionParam("t", NULL, 0,OBConversion::GENOPTIONS);
00090 OBConversion::RegisterOptionParam("k", NULL, 0,OBConversion::GENOPTIONS);
00091 OBConversion::RegisterOptionParam("filter", NULL, 1,OBConversion::GENOPTIONS);
00092 OBConversion::RegisterOptionParam("add", NULL, 1,OBConversion::GENOPTIONS);
00093 OBConversion::RegisterOptionParam("delete", NULL, 1,OBConversion::GENOPTIONS);
00094 OBConversion::RegisterOptionParam("append", NULL, 1,OBConversion::GENOPTIONS);
00095 }
00096 }
00097
00099 static bool ReadChemObjectImpl(OBConversion* pConv, OBFormat*);
00101 static bool WriteChemObjectImpl(OBConversion* pConv, OBFormat*);
00102
00104 virtual bool ReadChemObject(OBConversion* pConv)
00105 { return ReadChemObjectImpl(pConv, this);}
00106
00108 virtual bool WriteChemObject(OBConversion* pConv)
00109 { return WriteChemObjectImpl(pConv, this);}
00110
00112
00113
00114
00115 static bool DeferMolOutput(OBMol* pmol, OBConversion* pConv, OBFormat* pF);
00117 static bool OutputDeferredMols(OBConversion* pConv);
00119 static bool DeleteDeferredMols();
00121 static OBMol* MakeCombinedMolecule(OBMol* pFirst, OBMol* pSecond);
00123
00124 #ifdef _MSC_VER
00125 typedef stdext::hash_map<std::string, unsigned> NameIndexType;
00126 #else
00127 typedef std::map<std::string, unsigned> NameIndexType;
00128 #endif
00129
00130 // documentation in obmolecformat.cpp
00131 static bool ReadNameIndex(NameIndexType& index, const std::string& datafilename,
00132 OBFormat* pInFormat);
00133
00135 const std::type_info& GetType()
00136 {
00137 return typeid(OBMol*);
00138 }
00140

obmolecformat.h 1680
Open Babel: API Documentation
00141 };
00142
00143 }
00144 #endif //OB_MOLECULEFORMAT_H
00145

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

obmolecformat.h 1681
obmolecformat.h File Reference
Subclass of OBFormat for conversion of OBMol. More...

#include <openbabel/mol.h>
#include <openbabel/babelconfig.h>
#include <openbabel/obconversion.h>
#include <typeinfo>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBMoleculeFormat
An OBFormat convenience subclass for conversion to/from OBMol data. More...

Detailed Description
Subclass of OBFormat for conversion of OBMol.

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:

obmolecformat.h File Reference 1682


Open Babel: API Documentation

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

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

Detailed Description 1683


obutil.cpp File Reference
Various utility methods. More...

#include <openbabel/babelconfig.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/mol.h>
#include <openbabel/obutil.h>

Namespaces
namespace OpenBabel

Defines
#define ApproxZero 1E-7
#define IsZero(x) ((double)fabs(x)<ApproxZero)
#define PI 3.14159265358979323846226433
#define OneThird (1.0/3.0)
#define FourThirdsPI (4.0*PI/3.0)
#define TwoThirdsPI (2.0*PI/3.0)
#define MAX_SWEEPS 50

Functions
void ThrowError (char *str)
void ThrowError (std::string &str)
bool OBCompareInt (const int &a, const int &b)
bool OBCompareUnsigned (const unsigned int &a, const unsigned int &b)
bool IsNear (const double &a, const double &b, const double epsilon)
bool IsNearZero (const double &a, const double epsilon)
bool IsNan (const double &a)
bool CanBeSquared (const double &)
std::string NewExtension (string &src, char *ext)
vector3 center_coords (double *c, unsigned int size)
void rotate_coords (double *c, double m[3][3], unsigned int size)
double calc_rms (double *r, double *f, unsigned int N)
void SetRotorToAngle (double *c, vector< int > &tor, double ang, vector< int > &atoms)
bool SafeOpen (std::ifstream &fs, const char *filename)
bool SafeOpen (std::ofstream &fs, const char *filename)
bool SafeOpen (std::ifstream &fs, const string &filename)
bool SafeOpen (std::ofstream &fs, const string &filename)
void InvertCase (std::string &s, unsigned int start)
void InternalToCartesian (std::vector< OBInternalCoord * > &, OBMol &)
void CartesianToInternal (std::vector< OBInternalCoord * > &, OBMol &)
void qtrfit (double *r, double *f, int size, double u[3][3])
int SolveLinear (double A, double B)
int SolveQuadratic (double A, double B, double C)

obutil.cpp File Reference 1684


Open Babel: API Documentation

double CubeRoot (double X)


int SolveCubic (double A, double B, double C, double D)
void ob_make_rmat (double mat[3][3], double rmat[9])
static int get_roots_3_3 (double mat[3][3], double roots[3])
double superimpose (double *, double *, int)
void get_rmat (double *, double *, double *, int)
String conversion utilities
void ToUpper (std::string &s)
void ToUpper (char *cptr)
void ToLower (std::string &s)
void ToLower (char *cptr)
void InvertCase (char *cptr)
void CleanAtomType (char *)

Variables
static double Roots [4]

Detailed Description
Various utility methods.

Define Documentation

#define ApproxZero 1E-7

#define IsZero ( x ) ((double)fabs(x)<ApproxZero)

Referenced by OpenBabel::SolveCubic(), OpenBabel::SolveLinear(), and OpenBabel::SolveQuadratic().

#define PI 3.14159265358979323846226433

#define OneThird (1.0/3.0)

Referenced by OpenBabel::CubeRoot(), and OpenBabel::SolveCubic().

#define FourThirdsPI (4.0*PI/3.0)

Referenced by OpenBabel::SolveCubic().

#define TwoThirdsPI (2.0*PI/3.0)

Functions 1685
Open Babel: API Documentation

Referenced by OpenBabel::SolveCubic().

#define MAX_SWEEPS 50

Referenced by matrix3x3::jacobi(), and OpenBabel::ob_make_rmat().

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:53 2008 by 1.5.6.

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

Define Documentation 1686


obutil.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 obutil.h - Various utility methods.
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_UTIL_H
00021 #define OB_UTIL_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <string>
00026 #include <iosfwd>
00027
00028 #if TIME_WITH_SYS_TIME
00029 #include <sys/time.h>
00030 #include <time.h>
00031 #else
00032 #if HAVE_SYS_TIME_H
00033 #include <sys/time.h>
00034 #else
00035 #include <time.h>
00036 #endif
00037 #endif
00038
00039 #include <math.h>
00040
00041 #ifndef M_PI
00042 #define M_PI 3.14159265358979323846
00043 #endif
00044
00045 // For backwards compatibility. Will be removed in the future
00046 #include <openbabel/rand.h>
00047
00048 namespace OpenBabel
00049 {
00050
00051 // class introduction in obutil.cpp
00052 class OBAPI OBStopwatch
00053 {
00054 #if HAVE_CLOCK_T
00055 clock_t start;

obutil.h 1687
Open Babel: API Documentation
00056 clock_t stop;
00057 #else
00058 timeval start;
00059 timeval stop;
00060 #endif
00061
00062 public:
00063 #if HAVE_CLOCK_T
00064
00066 void Start()
00067 {
00068 start= clock();
00069 }
00071 double Lap()
00072 {
00073 stop= clock();
00074 return((stop - start) / CLOCKS_PER_SEC);
00075 }
00076 #else
00078 void Start()
00079 {
00080 gettimeofday(&start, NULL);
00081 }
00083 double Lap()
00084 {
00085 gettimeofday(&stop, NULL);
00086 return((stop.tv_sec - start.tv_sec)
00087 + (stop.tv_usec - start.tv_usec)/1000000.0);
00088 }
00089 #endif
00090
00092 double Elapsed()
00093 {
00094 return(Lap());
00095 }
00096 };
00097
00098
00101 class OBAPI OBSqrtTbl
00102 {
00103 double _max,_incr,*_tbl;
00104 public:
00105 OBSqrtTbl():
00106 _max(0.0), _incr(0.0), _tbl(NULL)
00107 { }
00112 OBSqrtTbl(const double max, const double incr):
00113 _max(max*max), _incr(incr), _tbl(NULL)
00114 {
00115 Init(max,incr);
00116 }
00117 ~OBSqrtTbl()
00118 {
00119 if (_tbl)
00120 {
00121 delete [] _tbl;
00122 _tbl = NULL;
00123 }
00124 }
00127 double Sqrt(double d2) const
00128 {
00129 if (_tbl)

obutil.h 1688
Open Babel: API Documentation
00130 return((d2 < _max) ? _tbl[static_cast<int>(d2*_incr)]:sqrt(d2));
00131 else
00132 return 0.0;
00133 }
00137 void Init(double max,double incr)
00138 {
00139 // parameters are potentially unneeded, but let's do this until we can
00140 // deprecate them
00141 _max = max * max;
00142 _incr = incr;
00143
00144 //array size needs to be large enough to account for fp error
00145 int i;
00146 double r;
00147 _tbl = new double [static_cast<int>((_max/_incr)+10)];
00148 for (r = (_incr/2.0),i=0;r <= _max;r += _incr,++i)
00149 _tbl[i] = sqrt(r);
00150
00151 _incr = 1/_incr;
00152 }
00153 };
00154
00155 //***RMS helper methods***/
00156 #ifndef SWIG
00157 OBAPI void rotate_coords(double*,double m[3][3],int);
00158 OBAPI double calc_rms(double*,double*,unsigned int);
00159
00161
00162 // Documentation in obutil.cpp
00163 OBAPI void ToUpper(std::string&);
00164 OBAPI void ToUpper(char*);
00165 OBAPI void ToLower(std::string&);
00166 OBAPI void ToLower(char *);
00167 OBAPI void InvertCase(std::string&, int);
00168 OBAPI void InvertCase(char *);
00170 OBAPI void CleanAtomType(char*);
00172
00175 OBAPI bool OBCompareInt(const int &a,const int &b);
00178 OBAPI bool OBCompareUnsigned(const unsigned int &a,const unsigned int &b);
00185 OBAPI bool IsNear(const double &, const double &, const double epsilon=2e-6);
00192 OBAPI bool IsNearZero(const double &, const double epsilon=2e-6);
00193 OBAPI bool IsNan(const double &);
00200 OBAPI inline bool IsNegligible(const double & a, const double & b,
00201 const double precision = 1e-11)
00202 {
00203 return( fabs(a) <= precision * fabs(b) );
00204 }
00222 OBAPI inline bool IsApprox(const double & a, const double & b,
00223 const double precision = 1e-11)
00224 {
00225 return( fabs(a - b) <= precision * std::min<const double>( fabs(a), fabs(b) ) );
00226 }
00228 OBAPI inline bool IsApprox_pos(const double &a, const double &b,
00229 const double precision = 1e-11)
00230 {
00231 return( fabs(a - b) <= precision * std::min<const double>( a, b ) );
00232 }
00236 OBAPI bool CanBeSquared(const double &);
00237
00238 OBAPI bool SafeOpen(std::ifstream &fs, const char *filename);
00239 OBAPI bool SafeOpen(std::ofstream &fs, const char *filename);

obutil.h 1689
Open Babel: API Documentation
00240 #endif
00241 // (end part to be skipped by SWIG)
00242
00243 //******************triple template*************************
00246 template <class T1, class T2, class T3>
00247 struct triple
00248 {
00249 //type names for the values
00250 typedef T1 first_type;
00251 typedef T2 second_type;
00252 typedef T3 third_type;
00253
00254 //member
00255 T1 first;
00256 T2 second;
00257 T3 third;
00258
00262 triple():
00263 first(T1()),second(T2()),third(T3())
00264 {}
00265
00267 triple(const T1 &a, const T2 &b, const T3 &c):
00268 first(a), second(b), third(c)
00269 {}
00270
00272 template<class U, class V, class W>
00273 triple(const triple<U,V,W> &t):
00274 first(t.first), second(t.second), third(t.third)
00275 {}
00276
00277 };
00278
00279 //**************quad template********************
00282 template <class T1, class T2, class T3, class T4>
00283 struct quad
00284 {
00285 //type names for the values
00286 typedef T1 first_type;
00287 typedef T2 second_type;
00288 typedef T3 third_type;
00289 typedef T4 fourth_type;
00290
00291 //member
00292 T1 first;
00293 T2 second;
00294 T3 third;
00295 T4 fourth;
00296
00300 quad():
00301 first(T1()),second(T2()),third(T3()),fourth(T4())
00302 {}
00303
00305 quad(const T1 &a, const T2 &b, const T3 &c, const T4 &d):
00306 first(a), second(b), third(c), fourth(d)
00307 {}
00308
00310 template<class U, class V, class W, class X>
00311 quad(const quad<U,V,W,X> &q):
00312 first(q.first), second(q.second), third(q.third), fourth(q.fourth)
00313 {}
00314

obutil.h 1690
Open Babel: API Documentation
00315 };
00316
00317 } // end namespace OpenBabel
00318
00319 #endif // OBUTIL_H
00320

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

obutil.h 1691
obutil.h File Reference
Various utility methods. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <iosfwd>
#include <time.h>
#include <math.h>
#include <openbabel/rand.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 OBStopwatch
Stopwatch class used for timing length of execution. More...
class OBSqrtTbl
Square Root lookup table - given a distance squared returns distance. More...
class triple
A 3-element templated, based on the design of the STL pair<>. More...
class quad
A 4-element templated, based on the design of the STL pair<>. More...

obutil.h File Reference 1692


Open Babel: API Documentation

Defines
#define M_PI 3.14159265358979323846

Functions
void rotate_coords (double *, double m[3][3], int)
double calc_rms (double *r, double *f, unsigned int N)
bool OBCompareInt (const int &a, const int &b)
bool OBCompareUnsigned (const unsigned int &a, const unsigned int &b)
bool IsNear (const double &a, const double &b, const double epsilon)
bool IsNearZero (const double &a, const double epsilon)
bool IsNan (const double &a)
bool IsNegligible (const double &a, const double &b, const double precision=1e-11)
bool IsApprox (const double &a, const double &b, const double precision=1e-11)
bool IsApprox_pos (const double &a, const double &b, const double precision=1e-11)
bool CanBeSquared (const double &)
bool SafeOpen (std::ifstream &fs, const char *filename)
bool SafeOpen (std::ofstream &fs, const char *filename)
String conversion utilities
void ToUpper (std::string &s)
void ToUpper (char *cptr)
void ToLower (std::string &s)
void ToLower (char *cptr)
void InvertCase (std::string &, int)
void InvertCase (char *cptr)
void CleanAtomType (char *)

Detailed Description
Various utility methods.

Define Documentation

#define M_PI 3.14159265358979323846

Referenced by OBBuilder::CorrectStereoBonds(), OBRotorRules::GetRotorIncrements(),


OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), and
OBForceField::VectorTorsionDerivative().

Defines 1693
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:53 2008 by 1.5.6.

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

Define Documentation 1694


op.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 op.h - plugin options or operations
00003
00004 Copyright (C) 2007 by Chris Morley
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, but
00014 WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016 General Public License for more details.
00017 ***********************************************************************/
00018
00019 #ifndef OB_OP_H
00020 #define OB_OP_H
00021
00022 #include <openbabel/babelconfig.h>
00023 #include <string>
00024 #include <map>
00025 #include <openbabel/plugin.h>
00026 #include <openbabel/base.h>
00027
00028 namespace OpenBabel
00029 {
00030
00031 // Class introduction below
00032 class OBAPI OBOp : public OBPlugin
00033 {
00034 MAKE_PLUGIN(OBOp);
00035
00036 public:
00037 typedef const std::map<std::string, std::string> OpMap ;
00038
00040 virtual const char* TypeID(){ return "ops"; }
00041
00043 virtual bool Do(OBBase* pOb, OpMap* pOptions=NULL, const char* OptionText=NULL)=0;
00044
00046 virtual bool WorksWith(OBBase* pOb)const=0;
00047
00049 static std::string OpOptions(OBBase* pOb)
00050 {
00051 std::string s;
00052 OBPlugin::PluginIterator itr;
00053 for(itr=OBPlugin::Begin("ops");itr!=OBPlugin::End("ops");++itr)
00054 {
00055 if(*(itr->first)=='_')//ignore ops with IDs that begin with '_'
00056 continue;
00057 OBOp* pOp = dynamic_cast<OBOp*>(itr->second);
00058 if(pOp && pOp->WorksWith(pOb))
00059 {

op.h 1695
Open Babel: API Documentation
00060 s += "--";
00061 s += itr->first; //ID
00062 s += ' ';
00063 s += OBPlugin::FirstLine(pOp->Description()) + '\n';
00064 }
00065 }
00066 s += '\n';
00067 return s;
00068 }
00069
00075 static bool DoOps(OBBase* pOb, OpMap* pOptions)
00076 {
00077 OpMap::const_iterator itr;
00078 for(itr=pOptions->begin();itr!=pOptions->end();++itr)
00079 {
00080 OBOp* pOp = FindType(itr->first.c_str());
00081 if(pOp)
00082 if(!pOp->Do(pOb, pOptions, itr->second.c_str()))
00083 return false; //Op has decided molecule should not be output
00084 }
00085 return true;
00086 }
00087 };
00088
00131 }//namespace
00132
00133 #endif
00134

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

op.h 1696
op.h File Reference
Base plugin class for operations on molecules. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <map>
#include <openbabel/plugin.h>
#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 OBOp
Operations to modify molecules before output. More...

Detailed Description
Base plugin class for operations on 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:

op.h File Reference 1697


Open Babel: API Documentation

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

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

Detailed Description 1698


ops.cpp File Reference
Base plugin class for operations on molecules. More...

#include <openbabel/babelconfig.h>
#include <openbabel/op.h>
#include <openbabel/mol.h>

Namespaces
namespace OpenBabel

Functions
OpCenter theOpCenter ("center")

Detailed Description
Base plugin class for operations on 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:53 2008 by 1.5.6.

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

ops.cpp File Reference 1699


optransform.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 optransform.h: makes option to transform molecule as specified in a datafile
00003 Copyright (C) 2008 Chris Morley
00004
00005 This file is part of the Open Babel project.
00006 For more information, see <http://openbabel.sourceforge.net/>
00007
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation version 2 of the License.
00011
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015 GNU General Public License for more details.
00016 ***********************************************************************/
00017
00018 #include <openbabel/babelconfig.h>
00019 #include <openbabel/mol.h>
00020 #include <openbabel/phmodel.h>
00021 #include <openbabel/op.h>
00022 #include <vector>
00023
00024 namespace OpenBabel
00025 {
00026
00031 class OpTransform : public OBOp
00032 {
00033 public:
00035 OpTransform(const char* ID, const char* filename, const char* descr)
00036 : OBOp(ID, false), _filename(filename), _descr(descr), _dataLoaded(false){}
00037
00038 ~OpTransform(){}
00039
00040 virtual const char* Description();
00041
00043 virtual bool WorksWith(OBBase* pOb)const{ return dynamic_cast<OBMol*>(pOb)!=NULL; }
00044
00046 virtual bool Do(OBBase* pOb, OpMap* pOptions=NULL, const char* OptionText=NULL);
00047
00048 virtual OpTransform* MakeInstance(const std::vector<std::string>& textlines)
00049 {
00050 OpTransform* pTransform = new OpTransform(
00051 textlines[1].c_str(),textlines[2].c_str(),textlines[3].c_str());
00052 pTransform->_textlines = textlines;
00053 return pTransform;
00054 }
00055
00056 private:
00057 bool Initialize();
00058 void ParseLine(const char *buffer);
00059
00060 private:
00061 const char* _filename;
00062 const char* _descr;

optransform.h 1700
Open Babel: API Documentation
00063 std::vector<std::string> _textlines;
00064
00065 bool _dataLoaded;
00066 std::vector<OBChemTsfm> _transforms;
00067 };
00068
00069 }//namespace
00070

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

optransform.h 1701
optransform.h File Reference
Operations to change molecules using a datafile of chemical transformations OBChemTsfm. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/phmodel.h>
#include <openbabel/op.h>
#include <vector>

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OpTransform
Applies molecular transforms (OBChemTsfm class) read from a datafile. More...

Detailed Description
Operations to change molecules using a datafile of chemical transformations OBChemTsfm.

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:53 2008 by 1.5.6.

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

optransform.h File Reference 1702


Further Information
Open Babel is a community project. In addition to this API documentation, the website offers a variety of
up-to-date and useful information for developing with the library.

Open Babel homepage:

• Developing with Open Babel


• Developer tutorials
• Contributing to the Open Babel project

SourceForge project pages:

• Open Babel project page


• Bug reporter
• Feature requests
• File format requests
• Mailing lists and archives

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

Further Information 1703


Related Pages
Here is a list of all related documentation pages:

• Introduction to Open Babel API


• Getting Started
• Main Classes
• What's New in Version 2.2
• What's New in Version 2.1
• Further Information
• Deprecated List
• Todo List

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

Related Pages 1704


parsmart.cpp File Reference
Implementation of Daylight SMARTS parser. More...

#include <openbabel/babelconfig.h>
#include <ctype.h>
#include <iomanip>
#include <openbabel/mol.h>
#include <openbabel/parsmart.h>

Namespaces
namespace OpenBabel

Defines
#define ELEMMAX 104
#define ATOMEXPRPOOL 1
#define BONDEXPRPOOL 1
#define ATOMPOOL 1
#define BONDPOOL 1
#define BF_NONRINGUNSPEC 0x0001
#define BF_NONRINGDOWN 0x0002
#define BF_NONRINGUP 0x0004
#define BF_NONRINGDOUBLE 0x0008
#define BF_NONRINGTRIPLE 0x0010
#define BF_RINGUNSPEC 0x0020
#define BF_RINGDOWN 0x0040
#define BF_RINGUP 0x0080
#define BF_RINGAROM 0x0100
#define BF_RINGDOUBLE 0x0200
#define BF_RINGTRIPLE 0x0400
#define BS_ALL 0x07FF
#define BS_SINGLE 0x00E7
#define BS_DOUBLE 0x0208
#define BS_TRIPLE 0x0410
#define BS_AROM 0x0100
#define BS_UP 0x0084
#define BS_DOWN 0x0042
#define BS_UPUNSPEC 0x00A5
#define BS_DOWNUNSPEC 0x0063
#define BS_RING 0x07E0
#define BS_DEFAULT 0x01E7
#define AE_LEAF 0x01
#define AE_RECUR 0x02
#define AE_NOT 0x03
#define AE_ANDHI 0x04
#define AE_OR 0x05

parsmart.cpp File Reference 1705


Open Babel: API Documentation
#define AE_ANDLO 0x06
#define AL_CONST 0x01
#define AL_MASS 0x02
#define AL_AROM 0x03
#define AL_ELEM 0x04
#define AL_HCOUNT 0x05
#define AL_NEGATIVE 0x06
#define AL_POSITIVE 0x07
#define AL_CONNECT 0x08
#define AL_DEGREE 0x09
#define AL_IMPLICIT 0x0a
#define AL_RINGS 0x0b
#define AL_SIZE 0x0c
#define AL_VALENCE 0x0d
#define AL_CHIRAL 0x0e
#define AL_HYB 0x0f
#define AL_RINGCONNECT 0x10
#define AL_CLOCKWISE 1
#define AL_ANTICLOCKWISE 2
#define AL_UNSPECIFIED 0
#define OB_EVAL_STACKSIZE 40

Functions
static bool match (OBMol &mol, Pattern *pat, std::vector<
std::vector< int > > &mlist, bool single=false)
static bool EvalAtomExpr (AtomExpr *expr, OBAtom *atom)
static bool EvalBondExpr (BondExpr *expr, OBBond *bond)
static int GetVectorBinding ()
static int CreateAtom (Pattern *, AtomExpr *, int, int vb=0)
static void FatalAllocationError (const char *ptr)
static void FreePattern (Pattern *)
static Pattern * CopyPattern (Pattern *)
static AtomExpr * AllocAtomExpr (void)
static AtomExpr * CopyAtomExpr (AtomExpr *expr)
static void FreeAtomExpr (AtomExpr *expr)
static AtomExpr * BuildAtomLeaf (int prop, int val)
static AtomExpr * BuildAtomNot (AtomExpr *expr)
static AtomExpr * BuildAtomBin (int op, AtomExpr *lft, AtomExpr
*rgt)
static AtomExpr * BuildAtomRecurs (Pattern *pat)
static AtomExpr * GenerateElement (int elem)
static AtomExpr * GenerateAromElem (int elem, int flag)
static int IsInvalidAtom (AtomExpr *expr)
static BondExpr * AllocBondExpr (void)
static BondExpr * CopyBondExpr (BondExpr *expr)
static bool EquivalentBondExpr (BondExpr *expr1, BondExpr
*expr2)
static void FreeBondExpr (BondExpr *expr)
static BondExpr * BuildBondLeaf (int prop, int val)

Defines 1706
Open Babel: API Documentation
static BondExpr * BuildBondNot (BondExpr *expr)
static BondExpr * BuildBondBin (int op, BondExpr *lft, BondExpr
*rgt)
static BondExpr * GenerateDefaultBond (void)
static Pattern * AllocPattern (void)
static int CreateBond (Pattern *pat, BondExpr *expr, int src,
int dst)
static Pattern * ParseSMARTSPattern (void)
static Pattern * ParseSMARTSPart (Pattern *, int)
static Pattern * SMARTSError (Pattern *pat)
static AtomExpr * ParseSimpleAtomPrimitive (void)
static AtomExpr * ParseComplexAtomPrimitive (void)
static AtomExpr * ParseAtomExpr (int level)
static BondExpr * ParseBondPrimitive (void)
static BondExpr * ParseBondExpr (int level)
static Pattern * ParseSMARTSError (Pattern *pat, BondExpr *expr)
static Pattern * SMARTSParser (Pattern *pat, ParseState *stat, int
prev, int part)
static void MarkGrowBonds (Pattern *pat)
static int GetChiralFlag (AtomExpr *expr)
static Pattern * ParseSMARTSString (char *ptr)
Pattern * ParseSMARTSRecord (char *ptr)
static void TraverseSMARTS (Pattern *pat, int i)
static AtomExpr * NotAtomExpr (AtomExpr *)
static AtomExpr * AndAtomExpr (AtomExpr *, AtomExpr *)
static AtomExpr * OrAtomExpr (AtomExpr *, AtomExpr *)
static int IsBooleanAtomLeaf (AtomExpr *expr)
static int IsNegatingAtomLeaf (AtomExpr *expr)
static int EqualAtomExpr (AtomExpr *lft, AtomExpr *rgt)
static int OrderAtomExpr (AtomExpr *lft, AtomExpr *rgt)
static int AtomLeafConflict (AtomExpr *lft, AtomExpr *rgt)
static int AtomExprConflict (AtomExpr *lft, AtomExpr *rgt)
static int AtomLeafImplies (AtomExpr *lft, AtomExpr *rgt)
static int AtomExprImplied (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * AtomExprImplies (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * AndAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
static AtomExpr * ConstrainRecursion (AtomExpr *recur, AtomExpr
*expr)
static AtomExpr * OrAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
static int GetBondLeafIndex (BondExpr *expr)
static int GetBondExprIndex (BondExpr *expr)
void SetupAtomMatchTable (std::vector< std::vector<
bool > > &ttab, Pattern *pat, OBMol &mol)
static void FastSingleMatch (OBMol &mol, Pattern *pat,
std::vector< std::vector< int > > &mlist)
static int GetExprOrder (BondExpr *expr)
void SmartsLexReplace (std::string &s, std::vector<
std::pair< std::string, std::string > > &vlex)

Functions 1707
Open Babel: API Documentation

Variables
std::vector< std::pair
< Pattern *, std::vector< bool > > > RSCACHE
static char * MainPtr
static char * LexPtr
static char Buffer [BUFF_SIZE]
static char Descr [BUFF_SIZE]

Detailed Description
Implementation of Daylight SMARTS parser.

Define Documentation

#define ELEMMAX 104

Referenced by OpenBabel::ParseComplexAtomPrimitive().

#define ATOMEXPRPOOL 1

#define BONDEXPRPOOL 1

#define ATOMPOOL 1

Referenced by OpenBabel::CreateAtom().

#define BONDPOOL 1

Referenced by OpenBabel::CreateBond().

#define BF_NONRINGUNSPEC 0x0001

#define BF_NONRINGDOWN 0x0002

#define BF_NONRINGUP 0x0004

#define BF_NONRINGDOUBLE 0x0008

Variables 1708
Open Babel: API Documentation

#define BF_NONRINGTRIPLE 0x0010

#define BF_RINGUNSPEC 0x0020

#define BF_RINGDOWN 0x0040

#define BF_RINGUP 0x0080

#define BF_RINGAROM 0x0100

#define BF_RINGDOUBLE 0x0200

#define BF_RINGTRIPLE 0x0400

#define BS_ALL 0x07FF

Referenced by OpenBabel::GetBondExprIndex(), and OpenBabel::GetBondLeafIndex().

#define BS_SINGLE 0x00E7

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_DOUBLE 0x0208

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_TRIPLE 0x0410

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_AROM 0x0100

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_UP 0x0084

Define Documentation 1709


Open Babel: API Documentation

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_DOWN 0x0042

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_UPUNSPEC 0x00A5

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_DOWNUNSPEC 0x0063

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_RING 0x07E0

Referenced by OpenBabel::GetBondLeafIndex().

#define BS_DEFAULT 0x01E7

#define AE_LEAF 0x01

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomLeafConflict(),


OpenBabel::AtomLeafImplies(), OpenBabel::BuildAtomLeaf(), OpenBabel::CopyAtomExpr(),
OpenBabel::CopyBondExpr(), OpenBabel::EqualAtomExpr(), OpenBabel::EquivalentBondExpr(),
OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(),
OpenBabel::GetChiralFlag(), OpenBabel::IsInvalidAtom(), OpenBabel::NotAtomExpr(),
OpenBabel::OrAtomExpr(), and OpenBabel::OrderAtomExpr().

#define AE_RECUR 0x02

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::BuildAtomRecurs(), OpenBabel::CopyAtomExpr(),


OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(),
OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(), and OpenBabel::GetChiralFlag().

#define AE_NOT 0x03

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::BuildAtomNot(), OpenBabel::CopyAtomExpr(), OpenBabel::CopyBondExpr(),
OpenBabel::EqualAtomExpr(), OpenBabel::EquivalentBondExpr(), OpenBabel::EvalAtomExpr(),
OpenBabel::FreeAtomExpr(), OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(),

Define Documentation 1710


Open Babel: API Documentation

OpenBabel::GetChiralFlag(), OpenBabel::NotAtomExpr(), and OpenBabel::OrderAtomExpr().

#define AE_ANDHI 0x04

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AndAtomExprLeaf(),


OpenBabel::AtomExprConflict(), OpenBabel::AtomExprImplied(), OpenBabel::AtomExprImplies(),
OpenBabel::CopyAtomExpr(), OpenBabel::CopyBondExpr(), OpenBabel::EquivalentBondExpr(),
OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(), OpenBabel::GenerateAromElem(),
OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(),
OpenBabel::NotAtomExpr(), and OpenBabel::ParseAtomExpr().

#define AE_OR 0x05

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::CopyAtomExpr(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(),
OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(),
OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), OpenBabel::OrAtomExprLeaf(), and
OpenBabel::ParseAtomExpr().

#define AE_ANDLO 0x06

Referenced by OpenBabel::CopyAtomExpr(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(),
OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(),
OpenBabel::NotAtomExpr(), and OpenBabel::ParseAtomExpr().

#define AL_CONST 0x01

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AndAtomExprLeaf(),


OpenBabel::ConstrainRecursion(), OpenBabel::EvalAtomExpr(), OpenBabel::IsBooleanAtomLeaf(),
OpenBabel::IsInvalidAtom(), OpenBabel::OrAtomExpr(), OpenBabel::ParseComplexAtomPrimitive(), and
OpenBabel::ParseSimpleAtomPrimitive().

#define AL_MASS 0x02

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_AROM 0x03

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::EvalAtomExpr(), OpenBabel::GenerateAromElem(), OpenBabel::IsBooleanAtomLeaf(),
OpenBabel::ParseComplexAtomPrimitive(), and OpenBabel::ParseSimpleAtomPrimitive().

Define Documentation 1711


Open Babel: API Documentation

#define AL_ELEM 0x04

Referenced by OpenBabel::EvalAtomExpr(), OpenBabel::GenerateAromElem(),


OpenBabel::GenerateElement(), and OBSmartsPattern::GetAtomicNum().

#define AL_HCOUNT 0x05

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::EvalAtomExpr(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_NEGATIVE 0x06

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetCharge(), and
OpenBabel::ParseComplexAtomPrimitive().

#define AL_POSITIVE 0x07

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetCharge(), and
OpenBabel::ParseComplexAtomPrimitive().

#define AL_CONNECT 0x08

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_DEGREE 0x09

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_IMPLICIT 0x0a

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::EvalAtomExpr(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_RINGS 0x0b

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::EvalAtomExpr(), OpenBabel::IsNegatingAtomLeaf(), and
OpenBabel::ParseComplexAtomPrimitive().

Define Documentation 1712


Open Babel: API Documentation

#define AL_SIZE 0x0c

Referenced by OpenBabel::AtomLeafImplies(), OpenBabel::EvalAtomExpr(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_VALENCE 0x0d

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_CHIRAL 0x0e

Referenced by OpenBabel::EvalAtomExpr(), OpenBabel::GetChiralFlag(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_HYB 0x0f

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_RINGCONNECT 0x10

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define AL_CLOCKWISE 1

Referenced by OpenBabel::EvalAtomExpr(), OpenBabel::match(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_ANTICLOCKWISE 2

Referenced by OpenBabel::EvalAtomExpr(), OpenBabel::match(), and


OpenBabel::ParseComplexAtomPrimitive().

#define AL_UNSPECIFIED 0

Referenced by OpenBabel::EvalAtomExpr(), and OpenBabel::ParseComplexAtomPrimitive().

#define OB_EVAL_STACKSIZE 40

Referenced by OpenBabel::GetChiralFlag().

Define Documentation 1713


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:53 2008 by 1.5.6.

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

Define Documentation 1714


parsmart.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 parsmart.h - Daylight SMARTS parser.
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_PARSMART_H
00021 #define OB_PARSMART_H
00022
00023 #include <string>
00024 #include <vector>
00025
00026 #include <openbabel/mol.h>
00027
00028 /*==========================*/
00029 /* SMARTS Data Structures */
00030 /*==========================*/
00031
00032 namespace OpenBabel
00033 {
00034
00035 // mark this so that SWIG will not attempt to wrap for scripting languages
00036
00037 #ifndef SWIG
00038
00041 typedef union _AtomExpr {
00042 int type;
00043 struct
00044 {
00045 int type;
00046 int prop;
00047 int value;
00048 }
00049 leaf;
00050 struct
00051 {
00052 int type;
00053 void *recur;
00054 }
00055 recur;
00056 struct
00057 {

parsmart.h 1715
Open Babel: API Documentation
00058 int type;
00059 union _AtomExpr *arg;
00060 }
00061 mon;
00062 struct
00063 {
00064 int type;
00065 union _AtomExpr *lft;
00066 union _AtomExpr *rgt;
00067 }
00068 bin;
00069 } AtomExpr;
00070
00071 #define BE_LEAF 0x01
00072 #define BE_ANDHI 0x02
00073 #define BE_ANDLO 0x03
00074 #define BE_NOT 0x04
00075 #define BE_OR 0x05
00076
00077 #define BL_CONST 0x01
00078 #define BL_TYPE 0x02
00079
00080 #define BT_SINGLE 0x01
00081 #define BT_DOUBLE 0x02
00082 #define BT_TRIPLE 0x03
00083 #define BT_AROM 0x04
00084 #define BT_UP 0x05
00085 #define BT_DOWN 0x06
00086 #define BT_UPUNSPEC 0x07
00087 #define BT_DOWNUNSPEC 0x08
00088 #define BT_RING 0x09
00089
00092 typedef union _BondExpr {
00093 int type;
00094 struct
00095 {
00096 int type;
00097 int prop;
00098 int value;
00099 }
00100 leaf;
00101 struct
00102 {
00103 int type;
00104 union _BondExpr *arg;
00105 }
00106 mon;
00107 struct
00108 {
00109 int type;
00110 union _BondExpr *lft;
00111 union _BondExpr *rgt;
00112 }
00113 bin;
00114 } BondExpr;
00115
00118 typedef struct
00119 {
00120 BondExpr *expr;
00121 int src,dst;
00122 int visit;

parsmart.h 1716
Open Babel: API Documentation
00123 bool grow;
00124 }
00125 BondSpec;
00126
00129 typedef struct
00130 {
00131 AtomExpr *expr;
00132 int visit;
00133 int part;
00134 int chiral_flag;
00135 int vb;
00136 }
00137 AtomSpec;
00138
00141 typedef struct
00142 {
00143 int aalloc,acount;
00144 int balloc,bcount;
00145 bool ischiral;
00146 AtomSpec *atom;
00147 BondSpec *bond;
00148 int parts;
00149 bool hasExplicitH;
00150 }
00151 Pattern;
00152 #else
00153 // for SWIG, just forward declare that we have some Pattern struct
00154 // (but this is private and not wrapped for scripting languages)
00155 struct Pattern;
00156 #endif
00157
00158 // class introduction in parsmart.cpp
00160 class OBAPI OBSmartsPattern
00161 {
00162 protected:
00163 std::vector<bool> _growbond;
00164 std::vector<std::vector<int> > _mlist;
00165 Pattern *_pat;
00166 std::string _str;
00167
00168 public:
00169 OBSmartsPattern() : _pat(NULL) { }
00170 virtual ~OBSmartsPattern();
00171
00172 OBSmartsPattern(const OBSmartsPattern& cp): _pat(NULL)
00173 {
00174 *this = cp;
00175 }
00176 OBSmartsPattern& operator=(const OBSmartsPattern& cp)
00177 {
00178 if (_pat)
00179 delete [] _pat;
00180 _pat = NULL;
00181 std::string s = cp._str;
00182 Init(s);
00183 return (*this);
00184 }
00185
00187
00188
00189

parsmart.h 1717
Open Babel: API Documentation
00190 bool Init(const char* pattern);
00193 bool Init(const std::string& pattern);
00195
00197
00198
00199 const std::string &GetSMARTS() const { return _str; }
00201 std::string &GetSMARTS() { return _str; }
00202
00204 bool Empty() const { return(_pat == NULL); }
00206 bool IsValid() const { return(_pat != NULL); }
00207
00209 unsigned int NumAtoms() const
00210 {
00211 return _pat ? _pat->acount : 0;
00212 }
00214 unsigned int NumBonds() const
00215 {
00216 return _pat ? _pat->bcount : 0;
00217 }
00218
00224 void GetBond(int& src,int& dst,int& ord,int idx);
00226 int GetAtomicNum(int idx);
00228 int GetCharge(int idx);
00229
00231 int GetVectorBinding(int idx) const
00232 {
00233 return(_pat->atom[idx].vb);
00234 }
00236
00238
00239
00240
00241
00242
00243 bool Match(OBMol &mol, bool single=false);
00244
00245 bool RestrictedMatch(OBMol &mol, std::vector<std::pair<int,int> > &pairs, bool single
00246
00247 bool RestrictedMatch(OBMol &mol, OBBitVec &bv, bool single=false);
00250 unsigned int NumMatches() const
00251 {
00252 return (unsigned int)_mlist.size();
00253 }
00254
00257 std::vector<std::vector<int> > &GetMapList()
00258 {
00259 return(_mlist);
00260 }
00262 std::vector<std::vector<int> >::iterator BeginMList()
00263 {
00264 return(_mlist.begin());
00265 }
00267 std::vector<std::vector<int> >::iterator EndMList()
00268 {
00269 return(_mlist.end());
00270 }
00271
00273
00283 std::vector<std::vector<int> > &GetUMapList();
00285
00287 void WriteMapList(std::ostream&);

parsmart.h 1718
Open Babel: API Documentation
00288 };
00289
00293 class OBAPI OBSSMatch
00294 {
00295 protected:
00296 bool *_uatoms;
00297 OBMol *_mol;
00298 Pattern *_pat;
00299 std::vector<int> _map;
00300
00301 public:
00302 OBSSMatch(OBMol&,Pattern*);
00303 ~OBSSMatch();
00304 void Match(std::vector<std::vector<int> > &v, int bidx=-1);
00305 };
00306
00307 OBAPI void SmartsLexReplace(std::string &,
00308 std::vector<std::pair<std::string,std::string> > &);
00309
00310 } // end namespace OpenBabel
00311
00312 #endif // OB_PARSMART_H
00313

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

parsmart.h 1719
parsmart.h File Reference
Daylight SMARTS parser. More...

#include <string>
#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
union _AtomExpr
An internal (SMARTS parser) atomic expression.
More...
union _BondExpr
An internal (SMARTS parser) bond expression.
More...
struct BondSpec

parsmart.h File Reference 1720


Open Babel: API Documentation
An internal (SMARTS parser) bond specification.
More...
struct AtomSpec
An internal (SMARTS parser) atom specification.
More...
struct Pattern
A SMARTS parser internal pattern. More...
class OBSmartsPattern
SMARTS (SMiles ARbitrary Target Specification)
substructure searching. More...
class OBSSMatch
Internal class: performs fast, exhaustive matching used
to find just a single match in match() using recursion
and explicit stack handling. More...

Defines
#define BE_LEAF 0x01
#define BE_ANDHI 0x02
#define BE_ANDLO 0x03
#define BE_NOT 0x04
#define BE_OR 0x05
#define BL_CONST 0x01
#define BL_TYPE 0x02
#define BT_SINGLE 0x01
#define BT_DOUBLE 0x02
#define BT_TRIPLE 0x03
#define BT_AROM 0x04
#define BT_UP 0x05
#define BT_DOWN 0x06
#define BT_UPUNSPEC 0x07
#define BT_DOWNUNSPEC 0x08
#define BT_RING 0x09

Typedefs
typedef union OpenBabel::_AtomExpr AtomExpr
typedef union OpenBabel::_BondExpr BondExpr

Functions
void SmartsLexReplace (std::string &, std::vector<
std::pair< std::string, std::string > > &)

Detailed Description
Daylight SMARTS parser.

Classes 1721
Open Babel: API Documentation

Define Documentation

#define BE_LEAF 0x01

Referenced by OpenBabel::BuildBondLeaf(), OpenBabel::EvalBondExpr(),


OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

#define BE_ANDHI 0x02

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(), OpenBabel::GetBondExprIndex(),


OpenBabel::GetExprOrder(), and OpenBabel::ParseBondExpr().

#define BE_ANDLO 0x03

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(), OpenBabel::GetBondExprIndex(),


OpenBabel::GetExprOrder(), and OpenBabel::ParseBondExpr().

#define BE_NOT 0x04

Referenced by OpenBabel::BuildBondNot(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(),


OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

#define BE_OR 0x05

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(),


OpenBabel::GenerateDefaultBond(), OpenBabel::GetBondExprIndex(), OpenBabel::GetExprOrder(), and
OpenBabel::ParseBondExpr().

#define BL_CONST 0x01

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), OpenBabel::GetExprOrder(),


and OpenBabel::ParseBondPrimitive().

#define BL_TYPE 0x02

Referenced by OpenBabel::GenerateDefaultBond(), and OpenBabel::ParseBondPrimitive().

#define BT_SINGLE 0x01

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GenerateDefaultBond(),


OpenBabel::GetBondLeafIndex(), OpenBabel::GetExprOrder(), and OpenBabel::ParseBondPrimitive().

Define Documentation 1722


Open Babel: API Documentation

#define BT_DOUBLE 0x02

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), OpenBabel::GetExprOrder(),


and OpenBabel::ParseBondPrimitive().

#define BT_TRIPLE 0x03

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), OpenBabel::GetExprOrder(),


and OpenBabel::ParseBondPrimitive().

#define BT_AROM 0x04

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GenerateDefaultBond(),


OpenBabel::GetBondLeafIndex(), OpenBabel::GetExprOrder(), and OpenBabel::ParseBondPrimitive().

#define BT_UP 0x05

Referenced by OpenBabel::EvalBondExpr(), and OpenBabel::GetBondLeafIndex().

#define BT_DOWN 0x06

Referenced by OpenBabel::EvalBondExpr(), and OpenBabel::GetBondLeafIndex().

#define BT_UPUNSPEC 0x07

Referenced by OpenBabel::EvalBondExpr(), and OpenBabel::GetBondLeafIndex().

#define BT_DOWNUNSPEC 0x08

Referenced by OpenBabel::EvalBondExpr(), and OpenBabel::GetBondLeafIndex().

#define BT_RING 0x09

Referenced by OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), and


OpenBabel::ParseBondPrimitive().

Define Documentation 1723


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:54 2008 by 1.5.6.

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

Define Documentation 1724


patty.cpp File Reference
Programmable atom typer. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/patty.h>

Namespaces
namespace OpenBabel

Detailed Description
Programmable atom typer.

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

patty.cpp File Reference 1725


patty.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 patty.h - Programmable atom typer.
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_PATTY_H
00021 #define OB_PATTY_H
00022
00023 namespace OpenBabel
00024 {
00025 #define PT_CATION 1
00026 #define PT_ANION 2
00027 #define PT_ACCEPTOR 3
00028 #define PT_POLAR 4
00029 #define PT_DONOR 5
00030 #define PT_HYDROPHOBIC 6
00031 #define PT_OTHER 7
00032 #define PT_METAL 8
00033
00034 // class introduction in patty.cpp
00035 class OBAPI patty
00036 {
00037 std::vector<OBSmartsPattern*> _sp;
00038 std::vector<std::string> smarts;
00039 std::vector<std::string> typ;
00040 bool debug;
00041
00042 public :
00043
00044 patty()
00045 {
00046 debug = false;
00047 }
00048 patty(char *s)
00049 {
00050 debug = false;
00051 read_rules(std::string(s));
00052 }
00053
00054 patty(const std::string &s)
00055 {

patty.h 1726
Open Babel: API Documentation
00056 debug = false;
00057 read_rules(s);
00058 }
00059
00060 ~patty()
00061 {
00062 std::vector<OBSmartsPattern*>::iterator i;
00063 for (i = _sp.begin();i != _sp.end();++i)
00064 delete *i;
00065 }
00066 void debug_on()
00067 {
00068 debug = true;
00069 }
00070 void debug_off()
00071 {
00072 debug = false;
00073 }
00074 void read_rules(const std::string &infile);
00075 void assign_rules(std::vector<std::string> &rules);
00076 void assign_types(OBMol &mol,std::vector<std::string> &atm_typ);
00077 void assign_types(OBMol &mol,std::vector<int> &atm_typ);
00078 int type_to_int(const std::string &type, bool failOnUndefined= false);
00079 int Istype(const std::string &type);
00080 };
00081
00082 } // end namespace OpenBabel
00083
00084 #endif // OB_PATTY_H
00085

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

patty.h 1727
patty.h File Reference
Programmable atom typer. (abbreviated P.At.Ty.). 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 patty
Programmable Atom Typer. More...

Defines
#define PT_CATION 1
#define PT_ANION 2
#define PT_ACCEPTOR 3
#define PT_POLAR 4
#define PT_DONOR 5
#define PT_HYDROPHOBIC 6
#define PT_OTHER 7
#define PT_METAL 8

Detailed Description
Programmable atom typer. (abbreviated P.At.Ty.).

Define Documentation

#define PT_CATION 1

Referenced by patty::type_to_int().

patty.h File Reference 1728


Open Babel: API Documentation

#define PT_ANION 2

Referenced by patty::type_to_int().

#define PT_ACCEPTOR 3

Referenced by patty::type_to_int().

#define PT_POLAR 4

Referenced by patty::type_to_int().

#define PT_DONOR 5

Referenced by patty::type_to_int().

#define PT_HYDROPHOBIC 6

Referenced by patty::type_to_int().

#define PT_OTHER 7

Referenced by patty::type_to_int().

#define PT_METAL 8

Referenced by patty::type_to_int().

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.

Define Documentation 1729


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

Define Documentation 1730


phmodel.cpp File Reference
Read pH rules and assign charges. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/phmodel.h>
#include "phmodeldata.h"

Namespaces
namespace OpenBabel

Detailed Description
Read pH rules and assign charges.

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

phmodel.cpp File Reference 1731


phmodel.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 phmodel.h - Read pH rules and assign charges.
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_PHMODEL_H
00021 #define OB_PHMODEL_H
00022
00023 #include <openbabel/parsmart.h>
00024 #include <openbabel/data.h>
00025
00026 namespace OpenBabel
00027 {
00028
00029 // class introduction in phmodel.cpp
00030 class OBAPI OBChemTsfm
00031 {
00032 std::vector<int> _vadel;
00033 std::vector<std::pair<int,int> > _vele;
00034 std::vector<std::pair<int,int> > _vchrg;
00035 std::vector<std::pair<int,int> > _vbdel;
00036 std::vector<std::pair<std::pair<int,int>,int> > _vbond;
00037 OBSmartsPattern _bgn,_end;
00038 public:
00039 OBChemTsfm() {}
00040 ~OBChemTsfm() {}
00042 bool Init(std::string&start, std::string &end);
00044 bool Apply(OBMol&);
00054 bool IsAcid();
00064 bool IsBase();
00065 };
00066
00107 class OBPhModel : public OBGlobalDataBase
00108 {
00109 std::vector<std::vector<int> > _mlist;
00110 std::vector<OBChemTsfm*> _vtsfm;
00111 std::vector<double> _vpKa;
00112 std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
00113 public:
00114 OBPhModel();
00115 ~OBPhModel();

phmodel.h 1732
Open Babel: API Documentation
00116
00117 void ParseLine(const char*);
00119 unsigned int GetSize() { return _vtsfm.size();}
00120 void AssignSeedPartialCharge(OBMol&);
00121 //void CorrectForPH(OBMol&);
00122 void CorrectForPH(OBMol&, double pH = 7.4 );
00123 };
00124
00125
00126
00127 } //namespace OpenBabel
00128
00129 #endif // OB_PHMODEL_H
00130
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:51 2008 by 1.5.6.

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

phmodel.h 1733
phmodel.h File Reference
Read pH rules and assign charges. 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 OBChemTsfm
SMARTS based structural modification (chemical transformation). More...
class OBPhModel
Corrections for pH used by OBMol::CorrectForPH(). More...

Detailed Description
Read pH rules and assign charges.

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:

phmodel.h File Reference 1734


Open Babel: API Documentation

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

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

Detailed Description 1735


plugin.cpp File Reference
Simplify 'plugin' classes to be discovered and/or loaded at runtime. More...

#include <openbabel/babelconfig.h>
#include <openbabel/plugin.h>
#include <iterator>

Namespaces
namespace OpenBabel

Detailed Description
Simplify 'plugin' classes to be discovered and/or loaded at runtime.

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

plugin.cpp File Reference 1736


plugin.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 plugin.h - facilitates construction of plugin classes
00003
00004 Copyright (C) 2007 by Chris Morley
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, but
00014 WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016 General Public License for more details.
00017 ***********************************************************************/
00018
00019 #ifndef OB_PLUGIN_H
00020 #define OB_PLUGIN_H
00021
00022 #include <openbabel/babelconfig.h>
00023 #include <string>
00024 #include <iostream>
00025 #include <vector>
00026 #include <map>
00027 #include <sstream>
00028 #include <cstring>
00029
00030 #ifndef OBERROR
00031 #define OBERROR
00032 #endif
00033
00034 namespace OpenBabel
00035 {
00036
00038 struct OBERROR CharPtrLess : public std::binary_function<const char*,const char*, bool>
00039 {
00040 bool operator()(const char* p1,const char* p2) const
00041 { return strcasecmp(p1,p2)<0; }
00042 };
00043
00049 class OBERROR OBPlugin
00050 {
00051 public:
00052
00053 //Maps of thistype are used to store
00054 // (a)a list of the plugin types in OBPlugin, and
00055 // (b)a list of the sub-types in each type class derived from OBPlugin.
00056 typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType;
00057 typedef PluginMapType::const_iterator PluginIterator;
00058
00060 virtual ~OBPlugin(){};
00061
00063 virtual const char* Description() { return NULL;} ;

plugin.h 1737
Open Babel: API Documentation
00064
00070 virtual bool Display(std::string&txt, const char* param, const char* ID=NULL);
00071
00076 virtual OBPlugin* MakeInstance(const std::vector<std::string>&){return NULL;}
00077
00079 static OBPlugin* GetPlugin(const char* Type, const char* ID)
00080 { return BaseFindType(GetTypeMap(Type), ID); }
00081
00083 const char* GetID()const{return _id;};
00084
00088 static bool ListAsVector(const char* PluginID, const char* param, std::vector<std::stri
00089
00091 static void List(const char* PluginID, const char* param=NULL, std::ostream* os=&std::c
00092
00094 static std::string ListAsString(const char* PluginID, const char* param=NULL);
00095
00097 static std::string FirstLine(const char* txt);
00098
00101 static PluginIterator Begin(const char* PluginID)
00102 {
00103 if( !strcmp(PluginID, "plugins") || GetTypeMap(PluginID)!=PluginMap())
00104 return GetTypeMap(PluginID).begin();
00105 else
00106 return PluginMap().end();
00107 }
00108
00109 static PluginIterator End(const char* PluginID)
00110 {
00111 return GetTypeMap(PluginID).end();
00112 }
00113
00115 virtual PluginMapType& GetMap() const =0;
00116
00117 protected:
00120 static PluginMapType& PluginMap()
00121 {
00122 static PluginMapType m;
00123 return m;
00124 }
00125
00127 static PluginMapType& GetTypeMap(const char* PluginID);
00128
00131 static OBPlugin* BaseFindType(PluginMapType& Map, const char* ID)
00132 {
00133 PluginMapType::iterator itr = Map.find(ID);
00134 if(itr==Map.end())
00135 return NULL;
00136 else
00137 return itr->second;
00138 }
00139
00140 protected:
00141 const char* _id;
00142 };
00143
00144 //Macro to be added to definition of the base class
00145 #define MAKE_PLUGIN(BaseClass)\
00146 protected:\
00147 virtual PluginMapType& GetMap()const{return Map();}\
00148 static PluginMapType& Map(){static PluginMapType m;return m;}\
00149 public:\

plugin.h 1738
Open Babel: API Documentation
00150 static BaseClass*& Default(){static BaseClass* d;return d;}\
00151 BaseClass(const char* ID, bool IsDefault=false)\
00152 {_id=ID;if(ID&&*ID){if(IsDefault || Map().empty()) Default() = this;\
00153 Map()[ID]=this;PluginMap()[TypeID()] =this;}}\
00154 static BaseClass* FindType(const char* ID)\
00155 {if(!ID || *ID==0) return Default();\
00156 return static_cast<BaseClass*>(BaseFindType(Map(),ID));}
00157
00286
00295 } // end namespce
00296
00297 #endif

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

plugin.h 1739
plugin.h File Reference
Simplify 'plugin' classes to be discovered and/or loaded at runtime. More...

#include <openbabel/babelconfig.h>
#include <string>
#include <iostream>
#include <vector>
#include <map>
#include <sstream>
#include <cstring>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
struct CharPtrLess
Case insensitive string comparison for PluginMapType key. More...
class OBPlugin
Base class for all types of dynamic classes discovered at runtime. More...

Defines
#define MAKE_PLUGIN(BaseClass)

Detailed Description
Simplify 'plugin' classes to be discovered and/or loaded at runtime.

plugin.h File Reference 1740


Open Babel: API Documentation
The code in this file makes it easy to make 'plugin' classes. These classes are derived from a base class, like
OBFingerprint. The derived classes ('sub-types' like fingerprint2) usually have a single instance. Plugin
classes are only discovered at runtime, so no existing code needs to be changed when adding a new derived
class. In some builds the new code can be added or removed by just moving a DLL or so file. The plugin
classes derived from any base class (including new ones) type can be listed from the commandline.

Step-by-Step Instructions
1) In the header file for YourBaseClass (which handles whatsits). Make sure to include the plugin.h header ,
derive the class from OBPlugin and in its definition add the MAKE_PLUGIN macro and a function TypeID()
containing a simple descriptor of the type

#include <openbabel/plugin.h>
class YourBaseClass : public OBPlugin
{
MAKE_PLUGIN(YourBaseClass)

const char* TypeID()


{ return "whatsits"; };

...rest of implementation, probably involving virtual functions redefined


in the sub-type classes
};

See below for what the macro contains.

2) Declare each sub-type in a class derived from the base class and give it a constructor which calls OBPlugin
constructor as shown:

class YourSubType1 : public YourBaseClass


{
public:
YourSubtype1(const char* ID, bool IsDefault=false)
: YourBaseClass(ID, IsDefault){}

virtual string Description()


{ return "A description with one or more lines";};

...rest of implementation
};

Only the first line of the description is used when the subclasses are listed.

3) Declare a global instance of the sub-type class which specifies its ID. and, optionally, whether it is to be
regarded as the default type of YourBaseClass.

YourSubType1 theType1("whatsit2",true);

4) The following functions are available:

YourBaseClass* YourBaseClass::FindType(const char* ID); This returns the default type when ID is NULL
or empty.

Detailed Description 1741


Open Babel: API Documentation

To list the sub-types of any plugin class use the List which sends to cout by default (or any other ostream if
specified).

OBPlugin::List("whatsits")

The ListAsString and ListAsVector functions are alternatives, usable with scripting.

It is also possible to iterate through each sub-type by the following code:

OBPlugin::PluginIterator itr;
for(itr=OBPlugin::Begin("whatsits");itr!=OBPlugin::End("whatsits");++itr)
{
itr is a std::map::const_iterator
itr->first is the ID of the subtype;
itr->second is The OBPlugin* which you will have to cast to your type
}

Since this is not the most beautiful code, it is probably better to use the List methods if possible.

YourBaseClass* MakeNewInstance();

How it works
MAKE_PLUGIN(YourBaseClass) inserts the following code into YourBaseClass:

protected:

//The collection of sub-types is in a local static variable to avoid


//any difficulties with the order of initialization of static objects.
static PluginMapType& Map()
{
static PluginMapType m;
return m;
}

//Making the map accessible to the base class (Cannot be used during construction)
virtual PluginMapType& GetMap()const
{
return Map();
}

public:
static YourBaseClass*& Default()
{
static YourBaseClass* d;
return d;
}

//Constructor registers the sub-type


YourBaseClass(const char* ID, bool IsDefault=false)
{
_id = ID;
if(ID && *ID) //do not register if ID is empty
{
if(IsDefault || Map().empty())
Default() = this;
Map()[ID]=this;

Step-by-Step Instructions 1742


Open Babel: API Documentation
//Ensure YourBaseClass is registered in OBPlugin so it can be accessed from the commandli
PluginMap()[TypeID()] =this;
}
}

static YourBaseClass* FindType(const char* ID)


{
if(!ID || *ID==0)
return Default();
return static_cast<YourBaseClass*>(BaseFindType(Map(),ID));
}

Define Documentation

#define MAKE_PLUGIN ( BaseClass )


Value:
protected:\
virtual PluginMapType& GetMap()const{return Map();}\
static PluginMapType& Map(){static PluginMapType m;return m;}\
public:\
static BaseClass*& Default(){static BaseClass* d;return d;}\
BaseClass(const char* ID, bool IsDefault=false)\
{_id=ID;if(ID&&*ID){if(IsDefault || Map().empty()) Default() = this;\
Map()[ID]=this;PluginMap()[TypeID()] =this;}}\
static BaseClass* FindType(const char* ID)\
{if(!ID || *ID==0) return Default();\
return static_cast<BaseClass*>(BaseFindType(Map(),ID));}

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

How it works 1743


pointgroup.cpp File Reference
Brute-force point group detection. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/atom.h>
#include <openbabel/pointgroup.h>
#include <iostream>
#include <string>
#include <math.h>

Namespaces
namespace OpenBabel

Defines
#define M_PI 3.1415926535897932384626433832795028841971694
#define DIMENSION 3
#define MAXPARAM 7
#define PointGroupsCount (sizeof(PointGroups)/sizeof(POINT_GROUP))

Variables
POINT_GROUP PointGroups []

Detailed Description
Brute-force point group detection.

Define Documentation

#define M_PI 3.1415926535897932384626433832795028841971694

#define DIMENSION 3

#define MAXPARAM 7

#define PointGroupsCount (sizeof(PointGroups)/sizeof(POINT_GROUP))

pointgroup.cpp File Reference 1744


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:54 2008 by 1.5.6.

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

Define Documentation 1745


pointgroup.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 pointgroup.h - Brute force point group symmetry detection
00003
00004 Copyright (C) 1996, 2003 S. Patchkovskii, Serguei.Patchkovskii@sympatico.ca
00005 Some portions Copyright (C) 2007 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_POINTGROUP_H
00021 #define OB_POINTGROUP_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <string>
00026
00027 #include <openbabel/mol.h>
00028
00029 namespace OpenBabel
00030 {
00031
00032 class PointGroupPrivate;
00033
00042 class OBAPI OBPointGroup
00043 {
00044 public:
00045 OBPointGroup();
00046 ~OBPointGroup();
00047
00049 void Setup(OBMol *);
00050
00052 const char *IdentifyPointGroup();
00053
00054 protected:
00055 PointGroupPrivate *d;
00056
00057 }; // class OBPointGroup
00058
00059 }// namespace OpenBabel
00060
00061 #endif // OB_POINT_GROUP_H
00062

pointgroup.h 1746
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

pointgroup.h 1747
pointgroup.h File Reference
Brute-force point group detection. More...

#include <openbabel/babelconfig.h>
#include <string>
#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 OBPointGroup
Brute-force point group symmetry perception. More...

Detailed Description
Brute-force point group detection.

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.

pointgroup.h File Reference 1748


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

Detailed Description 1749


rand.cpp File Reference
Pseudo random number generator. More...

#include <openbabel/babelconfig.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <openbabel/rand.h>
#include <time.h>

Namespaces
namespace OpenBabel

Defines
#define True 1
#define False 0
#define IsEven(x) (((x)&1)==0)
#define IsOdd(x) (((x)&1)!=0)
#define BothEven(x, y) IsEven((x)|(y))
#define IsPrime(x) (!IsEven((x))&&IsOddPrime((x)))
#define HiPart(x) (x>>16)
#define LoPart(x) ((x)&0xffff)
#define MAXFACT 10
#define MAXPRIMES 256

Functions
static unsigned int isqrt (unsigned int val)
static int IsOddPrime (unsigned int x)
static int RelativelyPrime (unsigned int x, unsigned int y)
void DoubleAdd (DoubleType *, unsigned int)
void DoubleMultiply (unsigned int, unsigned int, DoubleType *)
static int LeadingZeros (unsigned int x)
unsigned int DoubleModulus (DoubleType *, unsigned int)
static int DeterminePotency (unsigned int m, unsigned int a)
static int DetermineFactors (unsigned int x, unsigned int *factors)
static unsigned int DetermineIncrement (unsigned int m)
int DetermineSequence (unsigned int m, unsigned int *pm, unsigned int *pa, unsigned int
*pc)
void GenerateSequence (unsigned int p, unsigned int m, unsigned int a, unsigned int c)

rand.cpp File Reference 1750


Open Babel: API Documentation

Variables
static int primes [MAXPRIMES]

Detailed Description
Pseudo random number generator.

Define Documentation

#define True 1

Referenced by OpenBabel::DetermineSequence(), and OpenBabel::IsOddPrime().

#define False 0

Referenced by OpenBabel::DetermineSequence(), OpenBabel::IsOddPrime(), and


OpenBabel::RelativelyPrime().

#define IsEven ( x ) (((x)&1)==0)

Referenced by OpenBabel::RelativelyPrime().

#define IsOdd ( x ) (((x)&1)!=0)

#define BothEven ( x,
y ) IsEven((x)|(y))

Referenced by OpenBabel::RelativelyPrime().

#define IsPrime ( x ) (!IsEven((x))&&IsOddPrime((x)))

#define HiPart ( x ) (x>>16)

Referenced by OpenBabel::DoubleModulus(), and OpenBabel::DoubleMultiply().

#define LoPart ( x ) ((x)&0xffff)

Referenced by OpenBabel::DoubleModulus(), and OpenBabel::DoubleMultiply().

Variables 1751
Open Babel: API Documentation

#define MAXFACT 10

Referenced by OpenBabel::DetermineSequence().

#define MAXPRIMES 256

Referenced by OpenBabel::DetermineFactors(), and OpenBabel::IsOddPrime().

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

Define Documentation 1752


rand.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 rand.h - Pseudo random number generator.
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 RAND_H
00021 #define RAND_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 namespace OpenBabel
00026 {
00027
00028 //******************************************
00029 //*** Stuff for random number generation ***
00030 //******************************************
00031
00034 typedef struct
00035 {
00036 unsigned int hi;
00037 unsigned int lo;
00038 }
00039 DoubleType;
00040
00041 OBAPI void DoubleMultiply( unsigned int,unsigned int,DoubleType*);
00042 OBAPI void DoubleAdd( DoubleType*,unsigned int);
00043 OBAPI unsigned int DoubleModulus( DoubleType*,unsigned int);
00044
00047
00068 class OBAPI OBRandom
00069 {
00070 DoubleType d;
00071 unsigned int m,a,c;
00072 unsigned int p;
00073 unsigned int i;
00074 unsigned int x;
00075 bool OBRandomUseSysRand;
00076
00077 public:
00079 OBRandom(bool useSys= false);
00081 void Seed(int seed)

rand.h 1753
Open Babel: API Documentation
00082 {
00083 x = seed;
00084 }
00088 void TimeSeed();
00090 int NextInt();
00092 double NextFloat();
00093 };
00094
00095 } // end namespace OpenBabel
00096
00097 #endif // RAND_H
00098

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

rand.h 1754
rand.h File Reference
Pseudo random number generator. More...

#include <openbabel/babelconfig.h>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
struct DoubleType
Used for internal random number generation OBRandom (unless the system random generator is
used). More...
class OBRandom
Random number generator. More...

Functions
void DoubleMultiply (unsigned int, unsigned int, DoubleType *)
void DoubleAdd (DoubleType *, unsigned int)
unsigned int DoubleModulus (DoubleType *, unsigned int)

rand.h File Reference 1755


Open Babel: API Documentation

Detailed Description
Pseudo random number generator.

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

Detailed Description 1756


reaction.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 reaction.h - Handle chemical reactions (i.e., lists of reagents and products).
00003
00004 Copyright (C) 2005 by Chris Morley
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_REACT_H
00020 #define OB_REACT_H
00021
00022 #include <vector>
00023 #include <openbabel/mol.h>
00024
00025 #ifdef USE_BOOST
00026 #include <boost/shared_ptr.hpp>
00027 namespace std{ namespace tr1=::boost; }
00028 #else
00029 #include <tr1/memory>
00030 #endif
00031
00032 namespace OpenBabel
00033 {
00034
00041 class OBReaction : public OBBase
00042 {
00043 private:
00044 std::vector<std::tr1::shared_ptr<OBMol> > _reactants;
00045 std::vector<std::tr1::shared_ptr<OBMol> > _products;
00046 std::tr1::shared_ptr<OBMol> _ts;
00047 std::tr1::shared_ptr<OBMol> _agent;
00048 std::string _title;
00049 std::string _comment;
00050 bool _reversible;
00051 public:
00052 OBReaction() : _reversible(false)
00053 {}
00054
00055 int NumReactants() const
00056 { return _reactants.size(); }
00057
00058 int NumProducts()const
00059 { return _products.size(); }
00060
00061 void AddReactant(const std::tr1::shared_ptr<OBMol> sp)

reaction.h 1757
Open Babel: API Documentation
00062 { _reactants.push_back(sp); }
00063
00064 void AddProduct(const std::tr1::shared_ptr<OBMol> sp)
00065 { _products.push_back(sp); }
00066
00067 void SetTransitionState(const std::tr1::shared_ptr<OBMol> sp)
00068 { _ts = sp; }
00069
00070 void AddAgent(const std::tr1::shared_ptr<OBMol> sp)
00071 { _agent = sp; }
00072
00073 std::tr1::shared_ptr<OBMol> GetReactant(const unsigned i)
00074 {
00075 std::tr1::shared_ptr<OBMol> sp;
00076 if(i<_reactants.size())
00077 sp = _reactants[i];
00078 return sp; //returns empty if out of range
00079 }
00080 std::tr1::shared_ptr<OBMol> GetProduct(const unsigned i)
00081 {
00082 std::tr1::shared_ptr<OBMol> sp;
00083 if(i<_products.size())
00084 sp = _products[i];
00085 return sp; //returns empty if out of range
00086 }
00087
00088 std::tr1::shared_ptr<OBMol> GetTransitionState()const
00089 { return _ts; }
00090
00091 std::tr1::shared_ptr<OBMol> GetAgent()const
00092 { return _agent; }
00093
00094 std::string GetTitle() const { return _title; }
00095 std::string GetComment() const { return _comment; }
00096 void SetTitle(const std::string& title) { _title=title; }
00097 void SetComment(const std::string& comment) { _comment=comment; }
00098
00099 bool IsReversible() const {return _reversible;}
00100 void SetReversible(bool b=true) {_reversible=b;}
00101
00102 static const char* ClassDescription()
00103 {
00104 return " reactions\n";
00105 }
00106 };
00107
00108
00109 } //namespace OpenBabel
00110 #endif
00111

reaction.h 1758
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

reaction.h 1759
reaction.h File Reference
Handle chemical reactions (i.e., lists of reagents and products). More...

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBReaction
Used to store chemical reactions (i.e., reactants -> products). More...

Detailed Description
Handle chemical reactions (i.e., lists of reagents and products).

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

reaction.h File Reference 1760


residue.cpp File Reference
Handle macromolecule residues. More...

#include <openbabel/babelconfig.h>
#include <openbabel/residue.h>
#include <openbabel/atom.h>
#include <openbabel/oberror.h>
#include <openbabel/bitvec.h>
#include <openbabel/bond.h>
#include <cstring>
#include <cstdlib>

Namespaces
namespace OpenBabel

Functions
static unsigned int GetAtomIDNumber (const char *atomid)
static unsigned int GetResidueNumber (const char *res)
static void SetResidueKeys (const char *residue, unsigned int &reskey, unsigned int &aakey)

Detailed Description
Handle macromolecule residues.

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

residue.cpp File Reference 1761


Open Babel: API Documentation

• Classes
• Files

Detailed Description 1762


residue.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 residue.h - Defines for residue properties, names, etc.
00003
00004 Copyright (C) 2001, 2002 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 /**********************************************************************
00021 Global arrays Residue, ElemDesc and function GetResidueNumber were
00022 obtained in part or whole from RasMol2 by Roger Sayle.
00023 ***********************************************************************/
00024
00025 #ifndef OB_RESIDUE_H
00026 #define OB_RESIDUE_H
00027
00028 #include <openbabel/babelconfig.h>
00029
00030 #ifndef EXTERN
00031 # define EXTERN extern
00032 #endif
00033
00034 #include <vector>
00035 #include <string>
00036
00037 #include <openbabel/base.h>
00038
00039 namespace OpenBabel {
00040
00041 class OBAtom;
00043 typedef std::vector<OBAtom*>::iterator OBAtomIterator;
00044 class OBBond;
00046 typedef std::vector<OBBond*>::iterator OBBondIterator;
00047
00048 // Class OBResidue
00049 // class introduction in residue.cpp
00050 class OBAPI OBResidue : public OBBase
00051 {
00052 public:
00053
00055 OBResidue(void);
00057 OBResidue(const OBResidue &);
00059 virtual ~OBResidue(void);
00060

residue.h 1763
Open Babel: API Documentation
00061 OBResidue &operator=(const OBResidue &);
00062
00064 void AddAtom(OBAtom *atom);
00066 void InsertAtom(OBAtom *atom);
00068 void RemoveAtom(OBAtom *atom);
00073 bool Clear();
00074
00079 void SetName(const std::string &resname);
00081 void SetNum(const unsigned int resnum);
00082 void SetNum(const std::string resnum);
00084 void SetChain(const char chain);
00086 void SetChainNum(const unsigned int chainnum);
00089 void SetIdx(const unsigned int idx);
00090
00093 void SetAtomID(OBAtom *atom, const std::string &id);
00094 void SetHetAtom(OBAtom *atom, bool hetatm);
00096 void SetSerialNum(OBAtom *atom, unsigned int sernum);
00097
00099 std::string GetName(void) const;
00101 unsigned int GetNum(void);
00102 std::string GetNumString(void);
00104 unsigned int GetNumAtoms() const;
00106 char GetChain(void) const;
00108 unsigned int GetChainNum(void) const;
00110 unsigned int GetIdx(void) const;
00112 unsigned int GetResKey(void) const;
00113
00115 std::vector<OBAtom*> GetAtoms(void) const;
00118 std::vector<OBBond*> GetBonds(bool exterior= true)const;
00119
00122 std::string GetAtomID(OBAtom *atom) const;
00124 unsigned GetSerialNum(OBAtom *atom) const;
00125
00128 bool GetAminoAcidProperty(int) const;
00131 bool GetAtomProperty(OBAtom *a, int) const;
00134 bool GetResidueProperty(int) const;
00135
00137 bool IsHetAtom(OBAtom *atom) const;
00140 bool IsResidueType(int) const;
00141
00143
00144
00145 OBAtomIterator BeginAtoms() { return _atoms.begin(); }
00147 OBAtomIterator EndAtoms() { return _atoms.end(); }
00150 OBAtom *BeginAtom(std::vector<OBAtom*>::iterator &i);
00153 OBAtom *NextAtom(std::vector<OBAtom*>::iterator &i);
00155
00156 protected: // members
00157
00158 unsigned int _idx;
00159 char _chain;
00160 unsigned int _aakey;
00161 unsigned int _reskey;
00162 std::string _resnum;
00163 std::string _resname;
00164
00165 std::vector<bool> _hetatm;
00166 std::vector<std::string> _atomid;
00167 std::vector<OBAtom*> _atoms;
00168 std::vector<unsigned int> _sernum;
00169 // Now in OBBase

residue.h 1764
Open Babel: API Documentation
00170 // std::vector<OBGenericData*> _vdata; //!< Custom data
00171 }; // OBResidue
00172
00174 typedef std::vector<OBResidue*>::iterator OBResidueIterator;
00175
00177 // Global Definitions
00179
00180 #define MAXSETNO 40
00181 #define MAXELEM 1024
00182 #define MINELEM 29
00183 #define MAXRES 100
00184 #define MINRES 54
00185
00187 // Amino Acid Definitions
00189
00190 #define AA_ALA (1<<1)
00191 #define AA_GLY (1<<2)
00192 #define AA_LEU (1<<3)
00193 #define AA_SER (1<<4)
00194 #define AA_VAL (1<<5)
00195 #define AA_THR (1<<6)
00196 #define AA_LYS (1<<7)
00197 #define AA_ASP (1<<8)
00198 #define AA_ILE (1<<9)
00199 #define AA_ASN (1<<10)
00200 #define AA_GLU (1<<11)
00201 #define AA_PRO (1<<12)
00202 #define AA_ARG (1<<13)
00203 #define AA_PHE (1<<14)
00204 #define AA_GLN (1<<15)
00205 #define AA_TYR (1<<16)
00206 #define AA_HIS (1<<17)
00207 #define AA_CYS (1<<18)
00208 #define AA_MET (1<<19)
00209 #define AA_TRP (1<<20)
00210
00212 // Amino Acid Property Definitions
00214 #define IS_ACIDIC(x) ((x) & ((AA_ASP)|(AA_GLU)))
00215 #define IS_ACYCLIC(x) ((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)| \
00216 (AA_VAL)|(AA_THR)|(AA_LYS)|(AA_ASP)| \
00217 (AA_ILE)|(AA_ASN)|(AA_GLU)|(AA_GLN)| \
00218 (AA_CYS)|(AA_MET)))
00219 #define IS_ALIPHATIC(x) ((x) & ((AA_ALA)|(AA_GLY)|(AA_ILE)|(AA_LEU)| \
00220 (AA_VAL)))
00221 #define IS_AROMATIC(x) ((x) & ((AA_HIS)|(AA_PHE)|(AA_TRP)|(AA_TYR)))
00222 #define IS_BASIC(x) ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))
00223 #define IS_BURIED(x) ((x) & ((AA_ALA)|(AA_CYS)|(AA_ILE)|(AA_LEU)| \
00224 (AA_MET)|(AA_PHE)|(AA_TRP)|(AA_VAL)))
00225 #define IS_CHARGED(x) ((x) & ((AA_ASP)|(AA_GLU)|(AA_ARG)|(AA_HIS)| \
00226 (AA_LYS)))
00227 #define IS_CYCLIC(x) ((x) & ((AA_HIS)|(AA_PHE)|(AA_PRO)|(AA_TRP)| \
00228 (AA_TYR)))
00229 #define IS_HYDROPHOBIC(x) ((x) & ((AA_ALA)|(AA_LEU)|(AA_VAL)|(AA_ILE)| \
00230 (AA_PRO)|(AA_PHE)|(AA_MET)|(AA_TRP)))
00231 #define IS_LARGE(x) ((x) & ((AA_ARG)|(AA_PHE)|(AA_GLN)|(AA_TYR)| \
00232 (AA_HIS)|(AA_LEU)|(AA_LYS)|(AA_ILE)| \
00233 (AA_GLU)|(AA_MET)|(AA_TRP)))
00234 #define IS_MEDIUM(x) ((x) & ((AA_VAL)|(AA_THR)|(AA_ASP)|(AA_ASN)| \
00235 (AA_PRO)|(AA_CYS)))
00236 #define IS_NEGATIVE(x) ((x) & ((AA_ASP)|(AA_GLU)))
00237 #define IS_NEUTRAL(x) ((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)| \

residue.h 1765
Open Babel: API Documentation
00238 (AA_VAL)|(AA_THR)|(AA_PHE)|(AA_GLN)| \
00239 (AA_TYR)|(AA_HIS)|(AA_CYS)|(AA_MET)| \
00240 (AA_TRP)|(AA_ILE)|(AA_ASN)|(AA_PRO)))
00241 #define IS_POLAR(x) ((x) & ((AA_ASP)|(AA_ILE)|(AA_ASN)|(AA_GLU)| \
00242 (AA_SER)|(AA_THR)|(AA_ARG)|(AA_GLN)| \
00243 (AA_CYS)|(AA_HIS)))
00244 #define IS_POSITIVE(x) ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))
00245 #define IS_SMALL(x) ((x) & ((AA_ALA)|(AA_GLY)|(AA_SER)))
00246 #define IS_SURFACE(x) ((x) & ((AA_THR)|(AA_LYS)|(AA_ASP)|(AA_ILE)| \
00247 (AA_ASN)|(AA_GLU)|(AA_PRO)|(AA_ARG)| \
00248 (AA_GLY)|(AA_SER)|(AA_GLN)|(AA_TYR)| \
00249 (AA_HIS)))
00250
00252 namespace OBAminoAcidProperty
00253 {
00254 enum
00255 {
00256 ACIDIC = 0,
00257 ACYCLIC = 1,
00258 ALIPHATIC = 2,
00259 AROMATIC = 3,
00260 BASIC = 4,
00261 BURIED = 5,
00262 CHARGED = 6,
00263 CYCLIC = 7,
00264 HYDROPHOBIC = 8,
00265 LARGE = 9,
00266 MEDIUM = 10,
00267 NEGATIVE = 11,
00268 NEUTRAL = 12,
00269 POLAR = 13,
00270 POSITIVE = 14,
00271 SMALL = 15,
00272 SURFACE = 16
00273 };
00274 }
00275
00277 namespace OBResidueAtomProperty
00278 {
00279 enum
00280 {
00281 ALPHA_CARBON = 0,
00282 AMINO_BACKBONE = 1,
00283 BACKBONE = 2,
00284 CYSTEINE_SULPHUR = 3,
00285 LIGAND = 4,
00286 NUCLEIC_BACKBONE = 5,
00287 SHAPELY_BACKBONE = 6,
00288 SHAPELY_SPECIAL = 7,
00289 SIDECHAIN = 8,
00290 SUGAR_PHOSPHATE = 9
00291 };
00292 }
00293
00295 // some of these are invalid or troublesome in scripting interfaces
00296 // so they are removed by the #ifndef SWIG parts
00297 // (otherwise ignore them for C++ use)
00298 namespace OBResidueIndex
00299 {
00300 enum
00301 {

residue.h 1766
Open Babel: API Documentation
00302 ALA = 0,
00303 GLY = 1,
00304 LEU = 2,
00305 SER = 3,
00306 VAL = 4,
00307 #ifndef SWIGPERL
00308 THR = 5,
00309 #endif
00310 LYS = 6,
00311 ASP = 7,
00312 ILE = 8,
00313 ASN = 9,
00314 GLU = 10,
00315 PRO = 11,
00316 ARG = 12,
00317 PHE = 13,
00318 GLN = 14,
00319 TYR = 15,
00320 HIS = 16,
00321 CYS = 17,
00322 MET = 18,
00323 TRP = 19,
00324 ASX = 20,
00325 GLX = 21,
00326 PCA = 22,
00327 HYP = 23,
00328 A = 24,
00329 C = 25,
00330 G = 26,
00331 T = 27,
00332 U = 28,
00333 UPLUS = 29,
00334 I = 30,
00335 _1MA = 32,
00336 _5MC = 32,
00337 OMC = 33,
00338 _1MG = 34,
00339 _2MG = 35,
00340 M2G = 36,
00341 _7MG = 37,
00342 OMG = 38,
00343 YG = 39,
00344 H2U = 40,
00345 _5MU = 41,
00346 PSU = 42,
00347 UNK = 43,
00348 ACE = 44,
00349 FOR = 45,
00350 HOH = 46,
00351 DOD = 47,
00352 SO4 = 48,
00353 PO4 = 49,
00354 NAD = 50,
00355 COA = 51,
00356 NAP = 52,
00357 NDP = 53
00358 };
00359 }
00360
00362 namespace OBResidueProperty
00363 {

residue.h 1767
Open Babel: API Documentation
00364 enum
00365 {
00366 AMINO = 0,
00367 AMINO_NUCLEO = 1,
00368 COENZYME = 2,
00369 ION = 3,
00370 NUCLEO = 4,
00371 PROTEIN = 5,
00372 PURINE = 6,
00373 PYRIMIDINE = 7,
00374 SOLVENT = 8,
00375 WATER = 9
00376 };
00377 }
00378
00380 // Global Variables
00382
00383 EXTERN char Residue[MAXRES][4];
00384 EXTERN char ElemDesc[MAXELEM][4];
00385 EXTERN unsigned int ResNo;
00386 EXTERN unsigned int ElemNo;
00387 } // end namespace OpenBabel
00388
00389 #endif
00390

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

residue.h 1768
residue.h File Reference
Defines for residue properties, names, etc. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <string>
#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
namespace OpenBabel::OBAminoAcidProperty
namespace OpenBabel::OBResidueAtomProperty
namespace OpenBabel::OBResidueIndex
namespace OpenBabel::OBResidueProperty

Classes
class OBResidue
Residue information. More...

residue.h File Reference 1769


Open Babel: API Documentation

Defines
#define MAXSETNO 40
#define MAXELEM 1024
#define MINELEM 29
#define MAXRES 100
#define MINRES 54
#define AA_ALA (1<<1)
#define AA_GLY (1<<2)
#define AA_LEU (1<<3)
#define AA_SER (1<<4)
#define AA_VAL (1<<5)
#define AA_THR (1<<6)
#define AA_LYS (1<<7)
#define AA_ASP (1<<8)
#define AA_ILE (1<<9)
#define AA_ASN (1<<10)
#define AA_GLU (1<<11)
#define AA_PRO (1<<12)
#define AA_ARG (1<<13)
#define AA_PHE (1<<14)
#define AA_GLN (1<<15)
#define AA_TYR (1<<16)
#define AA_HIS (1<<17)
#define AA_CYS (1<<18)
#define AA_MET (1<<19)
#define AA_TRP (1<<20)
#define IS_ACIDIC(x) ((x) & ((AA_ASP)|(AA_GLU)))
#define IS_ACYCLIC(x)
#define IS_ALIPHATIC(x)
#define IS_AROMATIC(x) ((x) &
((AA_HIS)|(AA_PHE)|(AA_TRP)|(AA_TYR)))
#define IS_BASIC(x) ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))
#define IS_BURIED(x)
#define IS_CHARGED(x)
#define IS_CYCLIC(x)
#define IS_HYDROPHOBIC(x)
#define IS_LARGE(x)
#define IS_MEDIUM(x)
#define IS_NEGATIVE(x) ((x) & ((AA_ASP)|(AA_GLU)))
#define IS_NEUTRAL(x)
#define IS_POLAR(x)
#define IS_POSITIVE(x) ((x) &
((AA_ARG)|(AA_HIS)|(AA_LYS)))
#define IS_SMALL(x) ((x) &
((AA_ALA)|(AA_GLY)|(AA_SER)))
#define IS_SURFACE(x)

Defines 1770
Open Babel: API Documentation

Typedefs
typedef std::vector< OBResidue * >
::iterator OBResidueIterator

Enumerations
enum {
ACIDIC = 0, ACYCLIC = 1, ALIPHATIC = 2,
AROMATIC = 3,
BASIC = 4, BURIED = 5, CHARGED = 6, CYCLIC = 7,
HYDROPHOBIC = 8, LARGE = 9, MEDIUM = 10,
NEGATIVE = 11,
NEUTRAL = 12, POLAR = 13, POSITIVE = 14, SMALL
= 15,
SURFACE = 16
}
enum {
ALPHA_CARBON = 0, AMINO_BACKBONE = 1,
BACKBONE = 2, CYSTEINE_SULPHUR = 3,
LIGAND = 4, NUCLEIC_BACKBONE = 5,
SHAPELY_BACKBONE = 6, SHAPELY_SPECIAL = 7,
SIDECHAIN = 8, SUGAR_PHOSPHATE = 9
}
enum {
ALA = 0, GLY = 1, LEU = 2, SER = 3,
VAL = 4, THR = 5, LYS = 6, ASP = 7,
ILE = 8, ASN = 9, GLU = 10, PRO = 11,
ARG = 12, PHE = 13, GLN = 14, TYR = 15,
HIS = 16, CYS = 17, MET = 18, TRP = 19,
ASX = 20, GLX = 21, PCA = 22, HYP = 23,
A = 24, C = 25, G = 26, T = 27,
U = 28, UPLUS = 29, I = 30, _1MA = 32,
_5MC = 32, OMC = 33, _1MG = 34, _2MG = 35,
M2G = 36, _7MG = 37, OMG = 38, YG = 39,
H2U = 40, _5MU = 41, PSU = 42, UNK = 43,
ACE = 44, FOR = 45, HOH = 46, DOD = 47,
SO4 = 48, PO4 = 49, NAD = 50, COA = 51,
NAP = 52, NDP = 53
}
enum {
AMINO = 0, AMINO_NUCLEO = 1, COENZYME = 2,
ION = 3,
NUCLEO = 4, PROTEIN = 5, PURINE = 6, PYRIMIDINE
= 7,
SOLVENT = 8, WATER = 9
}

Typedefs 1771
Open Babel: API Documentation

Variables
char Residue [MAXRES][4]
char ElemDesc [MAXELEM][4]
unsigned int ResNo = MINRES
unsigned int ElemNo = MINELEM

Detailed Description
Defines for residue properties, names, etc.

Define Documentation

#define MAXSETNO 40

#define MAXELEM 1024

Referenced by OpenBabel::GetAtomIDNumber().

#define MINELEM 29

Referenced by OpenBabel::GetAtomIDNumber().

#define MAXRES 100

Referenced by OpenBabel::GetResidueNumber().

#define MINRES 54

Referenced by OpenBabel::GetResidueNumber().

#define AA_ALA (1<<1)

Referenced by OpenBabel::SetResidueKeys().

#define AA_GLY (1<<2)

Referenced by OpenBabel::SetResidueKeys().

Variables 1772
Open Babel: API Documentation

#define AA_LEU (1<<3)

Referenced by OpenBabel::SetResidueKeys().

#define AA_SER (1<<4)

Referenced by OpenBabel::SetResidueKeys().

#define AA_VAL (1<<5)

Referenced by OpenBabel::SetResidueKeys().

#define AA_THR (1<<6)

Referenced by OpenBabel::SetResidueKeys().

#define AA_LYS (1<<7)

Referenced by OpenBabel::SetResidueKeys().

#define AA_ASP (1<<8)

Referenced by OpenBabel::SetResidueKeys().

#define AA_ILE (1<<9)

Referenced by OpenBabel::SetResidueKeys().

#define AA_ASN (1<<10)

Referenced by OpenBabel::SetResidueKeys().

#define AA_GLU (1<<11)

Referenced by OpenBabel::SetResidueKeys().

#define AA_PRO (1<<12)

Referenced by OpenBabel::SetResidueKeys().

Define Documentation 1773


Open Babel: API Documentation

#define AA_ARG (1<<13)

Referenced by OpenBabel::SetResidueKeys().

#define AA_PHE (1<<14)

Referenced by OpenBabel::SetResidueKeys().

#define AA_GLN (1<<15)

Referenced by OpenBabel::SetResidueKeys().

#define AA_TYR (1<<16)

Referenced by OpenBabel::SetResidueKeys().

#define AA_HIS (1<<17)

Referenced by OpenBabel::SetResidueKeys().

#define AA_CYS (1<<18)

Referenced by OpenBabel::SetResidueKeys().

#define AA_MET (1<<19)

Referenced by OpenBabel::SetResidueKeys().

#define AA_TRP (1<<20)

Referenced by OpenBabel::SetResidueKeys().

#define IS_ACIDIC ( x ) ((x) & ((AA_ASP)|(AA_GLU)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_ACYCLIC ( x )
Value:
((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)| \
(AA_VAL)|(AA_THR)|(AA_LYS)|(AA_ASP)| \

Define Documentation 1774


Open Babel: API Documentation
(AA_ILE)|(AA_ASN)|(AA_GLU)|(AA_GLN)| \
(AA_CYS)|(AA_MET)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_ALIPHATIC ( x )
Value:
((x) & ((AA_ALA)|(AA_GLY)|(AA_ILE)|(AA_LEU)| \
(AA_VAL)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_AROMATIC ( x ) ((x) & ((AA_HIS)|(AA_PHE)|(AA_TRP)|(AA_TYR)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_BASIC ( x ) ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_BURIED ( x )
Value:
((x) & ((AA_ALA)|(AA_CYS)|(AA_ILE)|(AA_LEU)| \
(AA_MET)|(AA_PHE)|(AA_TRP)|(AA_VAL)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_CHARGED ( x )
Value:
((x) & ((AA_ASP)|(AA_GLU)|(AA_ARG)|(AA_HIS)| \
(AA_LYS)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_CYCLIC ( x )
Value:
((x) & ((AA_HIS)|(AA_PHE)|(AA_PRO)|(AA_TRP)| \
(AA_TYR)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_HYDROPHOBIC ( x )
Value:
((x) & ((AA_ALA)|(AA_LEU)|(AA_VAL)|(AA_ILE)| \

Define Documentation 1775


Open Babel: API Documentation
(AA_PRO)|(AA_PHE)|(AA_MET)|(AA_TRP)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_LARGE ( x )
Value:
((x) & ((AA_ARG)|(AA_PHE)|(AA_GLN)|(AA_TYR)| \
(AA_HIS)|(AA_LEU)|(AA_LYS)|(AA_ILE)| \
(AA_GLU)|(AA_MET)|(AA_TRP)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_MEDIUM ( x )
Value:
((x) & ((AA_VAL)|(AA_THR)|(AA_ASP)|(AA_ASN)| \
(AA_PRO)|(AA_CYS)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_NEGATIVE ( x ) ((x) & ((AA_ASP)|(AA_GLU)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_NEUTRAL ( x )
Value:
((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)| \
(AA_VAL)|(AA_THR)|(AA_PHE)|(AA_GLN)| \
(AA_TYR)|(AA_HIS)|(AA_CYS)|(AA_MET)| \
(AA_TRP)|(AA_ILE)|(AA_ASN)|(AA_PRO)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_POLAR ( x )
Value:
((x) & ((AA_ASP)|(AA_ILE)|(AA_ASN)|(AA_GLU)| \
(AA_SER)|(AA_THR)|(AA_ARG)|(AA_GLN)| \
(AA_CYS)|(AA_HIS)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_POSITIVE ( x ) ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))

Referenced by OBResidue::GetAminoAcidProperty().

Define Documentation 1776


Open Babel: API Documentation

#define IS_SMALL ( x ) ((x) & ((AA_ALA)|(AA_GLY)|(AA_SER)))

Referenced by OBResidue::GetAminoAcidProperty().

#define IS_SURFACE ( x )
Value:
((x) & ((AA_THR)|(AA_LYS)|(AA_ASP)|(AA_ILE)| \
(AA_ASN)|(AA_GLU)|(AA_PRO)|(AA_ARG)| \
(AA_GLY)|(AA_SER)|(AA_GLN)|(AA_TYR)| \
(AA_HIS)))

Referenced by OBResidue::GetAminoAcidProperty().

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

Define Documentation 1777


ring.cpp File Reference
Deal with rings, find smallest set of smallest rings (SSSR). More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/ring.h>

Namespaces
namespace OpenBabel

Defines
#define OB_RTREE_CUTOFF 20

Functions
static int DetermineFRJ (OBMol &)
static void BuildOBRTreeVector (OBAtom *, OBRTree *, vector< OBRTree * > &,
OBBitVec &)
bool CompareRingSize (const OBRing *, const OBRing *)
static void FindRings (OBMol &mol, vector< int > &path, OBBitVec &avisit, OBBitVec
&bvisit, int natom, int depth)

Variables
OBRingTyper ringtyper

Detailed Description
Deal with rings, find smallest set of smallest rings (SSSR).

Define Documentation

#define OB_RTREE_CUTOFF 20

Referenced by OpenBabel::BuildOBRTreeVector().

ring.cpp File Reference 1778


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:54 2008 by 1.5.6.

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

Define Documentation 1779


ring.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 ring.h - Deal with rings, find smallest set of smallest rings (SSSR).
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_RING_H
00021 #define OB_RING_H
00022
00023 #include <deque>
00024 #include <algorithm>
00025
00026 // TODO: Make this work as a free-standing header
00027 // Currently only used in ring.cpp which imports mol.h beforehand
00028 #include <openbabel/bitvec.h>
00029 #include <openbabel/typer.h>
00030
00031 namespace OpenBabel
00032 {
00033
00034 class OBMol;
00035 class OBAtom;
00036 class OBBond;
00037
00038 // class introduction in ring.cpp
00039 class OBAPI OBRing
00040 {
00041 OBMol *_parent;
00042 public:
00043 //public data members
00044 std::vector<int> _path;
00045 OBBitVec _pathset;
00046
00048
00049 OBRing() {}
00051 OBRing(std::vector<int>& path, int size);
00052 OBRing(std::vector<int>& path, OBBitVec set) : _path(path), _pathset(set) {}
00053 OBRing(const OBRing &src);
00054 OBRing& operator=(const OBRing &src);
00056
00057 //member functions
00058

ring.h 1780
Open Babel: API Documentation
00060 int Size() const { return(_path.size()); }
00063 int PathSize() const { return(_path.size()); }
00064
00068 bool IsAromatic();
00069
00071 void SetType(char *type);
00073 void SetType(std::string &type);
00075 char *GetType();
00079 unsigned int GetRootAtom();
00080
00082 bool IsMember(OBAtom *a);
00085 bool IsMember(OBBond *b);
00087 bool IsInRing(int i)
00088 {
00089 return(_pathset.BitIsOn(i));
00090 }
00091
00093 void SetParent(OBMol *m) { _parent = m; }
00095 OBMol *GetParent() { return(_parent);}
00096
00103 bool findCenterAndNormal(vector3 & center, vector3 &norm1, vector3 &norm2);
00104 private:
00105 char _type[30];
00106 };
00107
00110 OBAPI bool CompareRingSize(const OBRing *,const OBRing *);
00111
00112
00116 class OBAPI OBRingSearch
00117 {
00118 std::vector<OBBond*> _bonds;
00119 std::vector<OBRing*> _rlist;
00120 public:
00121 OBRingSearch() {}
00122 ~OBRingSearch();
00123
00125 void SortRings()
00126 {
00127 std::sort(_rlist.begin(),_rlist.end(),CompareRingSize);
00128 }
00130 void RemoveRedundant(int);
00132 void AddRingFromClosure(OBMol &,OBBond *);
00133
00134 bool SaveUniqueRing(std::deque<int>&,std::deque<int>&);
00135
00137 void WriteRings();
00138
00140
00141
00142 std::vector<OBRing*>::iterator BeginRings()
00143 {
00144 return(_rlist.begin());
00145 }
00147 std::vector<OBRing*>::iterator EndRings()
00148 {
00149 return(_rlist.end());
00150 }
00152 };
00153
00158 class OBAPI OBRTree
00159 {

ring.h 1781
Open Babel: API Documentation
00160 OBAtom *_atom;
00161 OBRTree *_prv;
00162 public:
00164 OBRTree(OBAtom*,OBRTree*);
00165 ~OBRTree() {}
00166
00168 int GetAtomIdx();
00170 void PathToRoot(std::vector<OBAtom*>&);
00171 };
00172
00173 } // end namespace OpenBabel
00174
00175 #endif // OB_RING_H
00176

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

ring.h 1782
ring.h File Reference
Deal with rings, find smallest set of smallest rings (SSSR). More...

#include <deque>
#include <algorithm>
#include <openbabel/bitvec.h>
#include <openbabel/typer.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 OBRing
Stores information on rings in a molecule from SSSR perception. More...
class OBRingSearch
Internal class to facilitate OBMol::FindSSSR(). More...
class OBRTree
Internal class for OBRing search algorithms to create a search tree of OBAtom objects. More...

Functions
bool CompareRingSize (const OBRing *, const OBRing *)

ring.h File Reference 1783


Open Babel: API Documentation

Detailed Description
Deal with rings, find smallest set of smallest rings (SSSR).

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

Detailed Description 1784


rotamer.cpp File Reference
Handle rotamer list data. More...

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

Namespaces
namespace OpenBabel

Defines
#define OB_TITLE_SIZE 254
#define OB_BINARY_SETWORD 32

Functions
double rint (double x)
void SetRotorToAngle (double *c, OBAtom **ref, double ang, vector< int > atoms)
int Swab (int)
int PackCoordinate (double c[3], double max[3])
void UnpackCoordinate (double c[3], double max[3], int tmp)

Variables
static int SINT = 0x00000001
static unsigned char * STPTR = (unsigned char*)&SINT

Detailed Description
Handle rotamer list data.

Define Documentation

#define OB_TITLE_SIZE 254

#define OB_BINARY_SETWORD 32

rotamer.cpp File Reference 1785


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:54 2008 by 1.5.6.

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

Define Documentation 1786


rotamer.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 rotamer.h - Handle rotamer list data.
00003
00004 Copyright (C) 1998-2000 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_ROTAMER_H
00021 #define OB_ROTAMER_H
00022
00023 #include <vector>
00024 #include <map>
00025
00026 #include <openbabel/mol.h>
00027 #include <openbabel/rotor.h>
00028 #include <openbabel/generic.h>
00029
00030 namespace OpenBabel
00031 {
00032
00034 // Further class introduction in rotamer.cpp
00035 class OBAPI OBRotamerList : public OBGenericData
00036 {
00038 unsigned int _NBaseCoords;
00040 std::vector<double*> _c;
00042 std::vector<std::pair<OBAtom**,std::vector<int> > > _vrotor;
00045 std::vector<std::vector<double> > _vres;
00047 std::vector<unsigned char*> _vrotamer;
00048
00049 /*Because contains OBAtom*, these aren't meaningful without knowing the parent molecu
00050 OBRotamerList(const OBRotamerList &cpy) : OBGenericData(cpy)
00051 {}
00052 OBRotamerList& operator =(const OBRotamerList &)
00053 {
00054 return *this;
00055 }
00056 */
00057
00058 public:
00059 OBRotamerList()
00060 {
00061 _NBaseCoords=0;
00062 _type= OBGenericDataType::RotamerList;

rotamer.h 1787
Open Babel: API Documentation
00063 _attr="RotamerList";
00064 }
00065 virtual OBGenericData* Clone(OBBase* parent) const;
00066
00067 ~OBRotamerList();
00069 void Setup(OBMol&,OBRotorList&);
00074 void Setup(OBMol &mol,unsigned char*ref,int nrotors);
00076 unsigned int NumRotors() const
00077 {
00078 return (unsigned int)_vrotor.size();
00079 }
00081 unsigned int NumRotamers() const
00082 {
00083 return (unsigned int)_vrotamer.size();
00084 }
00086 void AddRotamer(double*);
00088 void AddRotamer(int *key);
00090 void AddRotamer(std::vector<int> key);
00092 void AddRotamer(unsigned char *key);
00094 void AddRotamers(unsigned char *arr,int nconf);
00096 void GetReferenceArray(unsigned char*) const;
00097
00099
00100 std::vector<unsigned char*>::iterator BeginRotamer()
00101 {
00102 return _vrotamer.begin();
00103 }
00104 std::vector<unsigned char*>::iterator EndRotamer()
00105 {
00106 return _vrotamer.end();
00107 }
00109
00112 std::vector<double*> CreateConformerList(OBMol& mol);
00113
00116 void ExpandConformerList(OBMol&mol,std::vector<double*>& confs);
00117
00118 void SetCurrentCoordinates(OBMol &mol, std::vector<int> arr);
00119
00122 void SetBaseCoordinateSets(OBMol& mol)
00123 {
00124 SetBaseCoordinateSets(mol.GetConformers(), mol.NumAtoms());
00125 }
00126
00128
00131 void SetBaseCoordinateSets(std::vector<double*> bc, unsigned int N);
00132
00134 unsigned int NumBaseCoordinateSets() const
00135 {
00136 return _c.size();
00137 }
00138
00140 double *GetBaseCoordinateSet(unsigned int i) const
00141 {
00142 return (i<_c.size()) ? _c[i] : NULL;
00143 }
00144
00146 unsigned int NumAtoms() const
00147 {
00148 return _NBaseCoords;
00149 }
00150 };

rotamer.h 1788
Open Babel: API Documentation
00151
00153 int Swab(int);
00154
00155 }
00156
00157 #endif // OB_ROTAMER_H
00158

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

rotamer.h 1789
rotamer.h File Reference
Handle rotamer list data. More...

#include <vector>
#include <map>
#include <openbabel/mol.h>
#include <openbabel/rotor.h>
#include <openbabel/generic.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 OBRotamerList
Supports a set of rotamer coordinate sets for some number of potentially rotatable bonds. More...

Functions
int Swab (int)

Detailed Description
Handle rotamer list data.

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

rotamer.h File Reference 1790


Open Babel: API Documentation
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

Detailed Description 1791


rotor.cpp File Reference
Rotate dihedral angles according to rotor rules. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/rotor.h>
#include "torlib.h"

Namespaces
namespace OpenBabel

Defines
#define OB_DEFAULT_DELTA 10.0

Functions
static bool GetDFFVector (OBMol &, vector< int > &, OBBitVec &)
static bool CompareRotor (const pair< OBBond *, int > &, const pair< OBBond *, int > &)
static double MinimumPairRMS (OBMol &, double *, double *, bool &)

Detailed Description
Rotate dihedral angles according to rotor rules.

Define Documentation

#define OB_DEFAULT_DELTA 10.0


Default step resolution for a dihedral angle (in degrees).

Referenced by OBRotorRules::GetRotorIncrements(), and OBRotorRules::ParseLine().

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

rotor.cpp File Reference 1792


Open Babel: API Documentation
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

Define Documentation 1793


rotor.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 rotor.h - Rotate torsional according to rotor rules.
00003
00004 Copyright (C) 1998-2000 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_ROTOR_H
00021 #define OB_ROTOR_H
00022
00023 #include <openbabel/parsmart.h>
00024 #include <openbabel/typer.h>
00025
00026 namespace OpenBabel
00027 {
00028
00029 #ifndef SQUARE
00030 #define SQUARE(x) ((x)*(x))
00031 #endif
00032
00040 class OBAPI OBRotorRule
00041 {
00042 int _ref[4];
00043 double _delta;
00044 std::string _s;
00045 OBSmartsPattern* _sp;
00046 std::vector<double> _vals;
00047 public:
00048
00049 OBRotorRule(char *buffer,int ref[4],std::vector<double> &vals,double d):
00050 _delta(d), _s(buffer), _vals(vals)
00051 {
00052 _sp = new OBSmartsPattern;
00053 _sp->Init(buffer);
00054 memcpy(_ref,ref,sizeof(int)*4);
00055 }
00056
00057 ~OBRotorRule()
00058 {
00059 if (_sp)
00060 {
00061 delete _sp;
00062 _sp = NULL;

rotor.h 1794
Open Babel: API Documentation
00063 }
00064 }
00065
00067 bool IsValid() { return(_sp->IsValid()); }
00071 void GetReferenceAtoms(int ref[4]) { memcpy(ref,_ref,sizeof(int)*4); }
00073 void SetDelta(double d) { _delta = d; }
00075 double GetDelta() { return(_delta); }
00077 std::vector<double> &GetTorsionVals() { return(_vals); }
00079 std::string &GetSmartsString(){ return(_s); }
00081 OBSmartsPattern *GetSmartsPattern() { return(_sp); }
00082 };
00083
00090 class OBAPI OBRotorRules : public OBGlobalDataBase
00091 {
00092 bool _quiet;
00093 std::vector<OBRotorRule*> _vr;
00094 std::vector<double> _sp3sp3;
00095 std::vector<double> _sp3sp2;
00096 std::vector<double> _sp2sp2;
00097 public:
00098 OBRotorRules();
00099 ~OBRotorRules();
00100
00101 void ParseLine(const char*);
00103 unsigned int GetSize() { return _vr.size();}
00104
00106 void SetFilename(std::string &s) { _filename = s; }
00107
00114 void GetRotorIncrements(OBMol& mol,OBBond* bond,int refs[4],
00115 std::vector<double> &vals,double &delta);
00117 void Quiet() { _quiet=true; }
00118 };
00119
00122 class OBAPI OBRotor
00123 {
00124 int _idx,_ref[4];
00125 int *_rotatoms,_size,_numcoords;
00126 double _delta;
00127 double _imag,_refang;
00128 OBBond *_bond;
00129 std::vector<int> _torsion;
00130 OBBitVec _fixedatoms,_evalatoms;
00131 std::vector<double> _res;
00132 std::vector<double> _invmag;
00133 std::vector<std::vector<double> > _sn,_cs,_t;
00134 public:
00135 OBRotor();
00136 ~OBRotor()
00137 {
00138 if (_rotatoms)
00139 delete [] _rotatoms;
00140 }
00141 int Size()
00142 {
00143 return((_res.empty())?0:_res.size());
00144 }
00145 int GetIdx() const
00146 {
00147 return(_idx);
00148 }
00149 void SetNumCoords(int nc)

rotor.h 1795
Open Babel: API Documentation
00150 {
00151 _numcoords = nc;
00152 }
00153 void SetBond(OBBond *bond)
00154 {
00155 _bond = bond;
00156 }
00157 void SetEvalAtoms(OBBitVec &bv)
00158 {
00159 _evalatoms = bv;
00160 }
00161 void SetDihedralAtoms(std::vector<int> &vi)
00162 {
00163 _torsion = vi;
00164 }
00165 void SetDelta(double d)
00166 {
00167 _delta = d;
00168 }
00169 void SetDihedralAtoms(int ref[4]);
00170 void SetRotAtoms(std::vector<int>&);
00171
00172 inline void SetToAngle(double *c,double setang)
00173 {
00174 double dx,dy,dz,sn,cs,t,ang,mag;
00175 ang = setang - CalcTorsion(c);
00176 if (fabs(ang) < 1e-5)
00177 return;
00178
00179 sn = sin(ang);
00180 cs = cos(ang);
00181 t = 1 - cs;
00182 dx = c[_torsion[1]] - c[_torsion[2]];
00183 dy = c[_torsion[1]+1] - c[_torsion[2]+1];
00184 dz = c[_torsion[1]+2] - c[_torsion[2]+2];
00185 mag = sqrt(SQUARE(dx) + SQUARE(dy) + SQUARE(dz));
00186 Set(c,sn,cs,t,1.0/mag);
00187 }
00188
00189 void SetRotor(double *,int,int prev=-1);
00190 void Set(double*,int);
00191 void Precompute(double*);
00192 void Set(double *c,int ridx,int cidx)
00193 {
00194 Set(c,_sn[cidx][ridx],_cs[cidx][ridx],_t[cidx][ridx],_invmag[cidx]);
00195 }
00196 void Set(double*,double,double,double,double);
00197 void Precalc(std::vector<double*>&);
00198 void SetIdx(int idx)
00199 {
00200 _idx = idx;
00201 }
00202 void SetFixedAtoms(OBBitVec &bv)
00203 {
00204 _fixedatoms = bv;
00205 }
00206 void SetTorsionValues(std::vector<double> &tmp)
00207 {
00208 _res = tmp;
00209 }
00210 void RemoveSymTorsionValues(int);

rotor.h 1796
Open Babel: API Documentation
00211 void GetDihedralAtoms(int ref[4])
00212 {
00213 for (int i=0;i<4;++i)
00214 ref[i]=_ref[i];
00215 }
00216 void *GetRotAtoms()
00217 {
00218 return(_rotatoms);
00219 }
00220 double CalcTorsion(double *);
00221 double CalcBondLength(double*);
00222 double GetDelta()
00223 {
00224 return(_delta);
00225 }
00226 OBBond *GetBond()
00227 {
00228 return(_bond);
00229 }
00230 std::vector<int> &GetDihedralAtoms()
00231 {
00232 return(_torsion);
00233 }
00234 std::vector<double> &GetResolution()
00235 {
00236 return(_res);
00237 }
00238 std::vector<double>::iterator BeginTorIncrement()
00239 {
00240 return(_res.begin());
00241 }
00242 std::vector<double>::iterator EndTorIncrement()
00243 {
00244 return(_res.end());
00245 }
00246 OBBitVec &GetEvalAtoms()
00247 {
00248 return(_evalatoms);
00249 }
00250 OBBitVec &GetFixedAtoms()
00251 {
00252 return(_fixedatoms);
00253 }
00254 };
00255
00256
00258 typedef std::vector<OBRotor*>::iterator OBRotorIterator;
00259
00262 class OBAPI OBRotorList
00263 {
00264 bool _quiet;
00265 bool _removesym;
00266 OBBitVec _fix;
00267 OBRotorRules _rr;
00268 std::vector<int> _dffv;
00269 std::vector<OBRotor*> _rotor;
00270
00271 std::vector<std::pair<OBSmartsPattern*,std::pair<int,int> > > _vsym2;
00273 std::vector<std::pair<OBSmartsPattern*,std::pair<int,int> > > _vsym3;
00274 public:
00275

rotor.h 1797
Open Babel: API Documentation
00276 OBRotorList();
00277 ~OBRotorList();
00278
00280 void Clear();
00281
00283 int Size()
00284 {
00285 return((_rotor.empty()) ? 0: _rotor.size());
00286 }
00288 void Init(std::string &fname)
00289 {
00290 _rr.SetFilename(fname);
00291 _rr.Init();
00292 }
00294 void SetQuiet() { _quiet=true; _rr.Quiet(); }
00295
00297 void SetFixAtoms(OBBitVec &fix) { _fix = fix; }
00298
00301 bool IsFixedBond(OBBond*);
00303 bool HasFixedAtoms()
00304 {
00305 return(!_fix.Empty());
00306 }
00307
00311 void SetRotAtomsByFix(OBMol&);
00312
00317 bool SetRotAtoms(OBMol&);
00318
00322 bool Setup(OBMol &);
00326 bool FindRotors(OBMol &);
00330 bool SetEvalAtoms(OBMol&);
00333 bool AssignTorVals(OBMol &);
00334
00337 void IgnoreSymmetryRemoval() { _removesym = false;}
00341 void RemoveSymVals(OBMol&);
00342
00344
00345 OBRotor *BeginRotor(OBRotorIterator &i)
00346 { i = _rotor.begin(); return((i ==_rotor.end()) ? NULL:*i); }
00347 OBRotor *NextRotor(OBRotorIterator &i)
00348 { ++i; return((i ==_rotor.end()) ? NULL:*i); }
00349 OBRotorIterator BeginRotors() { return(_rotor.begin()); }
00350 OBRotorIterator EndRotors() { return(_rotor.end()); }
00352
00353 // Not declared
00355 bool IdentifyEvalAtoms(OBMol &mol) { return SetEvalAtoms(mol); }
00356 };
00357
00359 class rotor_digit {
00360 public:
00361 rotor_digit(unsigned int rs)
00362 {
00363 resolution_size = rs;
00364 state = 0;
00365 }
00366
00367 rotor_digit()
00368 {
00369 resolution_size = 0;
00370 state = 0;
00371 }

rotor.h 1798
Open Babel: API Documentation
00372
00373 void set_size(unsigned int rs)
00374 {
00375 resolution_size = rs;
00376 state = 0;
00377 }
00378
00379 void set_state(int st)
00380 {
00381 state = st;
00382 }
00383
00384 int get_state()
00385 {
00386 return state;
00387 }
00388
00389 unsigned int size()
00390 {
00391 return resolution_size;
00392 }
00393
00394 bool next()
00395 {
00396 if (state<resolution_size - 1) {
00397 state++;
00398 return false;
00399 } else
00400 state = 0;
00401
00402 return true;
00403 }
00404 private:
00405 unsigned int resolution_size;
00406 int state;
00407 } typedef rotor_digit;
00409
00412 class OBAPI OBRotorKeys
00413 {
00459 public:
00461 OBRotorKeys()
00462 {
00463 _vr.clear();
00464 }
00465
00467 void Clear(){
00468 _vr.clear();
00469 }
00470
00472 unsigned int NumKeys()
00473 {
00474 unsigned int numKeys = 0;
00475
00476 while (Next())
00477 numKeys++;
00478
00479 return numKeys;
00480 }
00481
00484 void AddRotor(unsigned int size)
00485 {

rotor.h 1799
Open Babel: API Documentation
00486 rotor_digit *rd;
00487 rd = new rotor_digit(size);
00488 _vr.push_back(*rd);
00489 }
00490
00493 bool Next()
00494 {
00495 if(_vr.size() == 0)
00496 return false;
00497
00498 bool carry = _vr[0].next();
00499 unsigned int i = 1;
00500 while (carry) {
00501 if(i == _vr.size())
00502 return false;
00503
00504 carry = _vr[i].next();
00505 i++;
00506 }
00507 return true;
00508 }
00509
00512 std::vector<int> GetKey()
00513 {
00514 std::vector<int> rt;
00515 rt.clear();
00516 rt.push_back(0);
00517 for(unsigned int i = 0; i < _vr.size(); i++){
00518 rt.push_back(_vr[i].get_state());
00519 }
00520
00521 return rt;
00522 }
00523
00524 private:
00525 std::vector<rotor_digit> _vr;
00526 };
00527
00528
00529 } // end namespace OpenBabel
00530
00531 #endif // OB_ROTOR_H
00532

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:

rotor.h 1800
Open Babel: API Documentation

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

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

rotor.h 1801
rotor.h File Reference
Rotate torsional according to rotor rules. More...

#include <openbabel/parsmart.h>
#include <openbabel/typer.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 OBRotorRule
A rule for torsional conformer searching, defined by a SMARTS pattern.
More...
class OBRotorRules
Database of default hybridization torsional rules and SMARTS-defined
OBRotorRule objects. More...
class OBRotor
A single rotatable OBBond as part of rotamer searching. More...
class OBRotorList
Given an OBMol, set up a list of possibly rotatable torsions,. More...
class OBRotorKeys
A class to generate all possible rotorKeys. More...

Defines
#define SQUARE(x) ((x)*(x))

rotor.h File Reference 1802


Open Babel: API Documentation

Typedefs
typedef std::vector< OBRotor * >
::iterator OBRotorIterator

Detailed Description
Rotate torsional according to rotor rules.

Define Documentation

#define SQUARE ( x ) ((x)*(x))

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

Typedefs 1803
snprintf.h
Go to the documentation of this file.

00001 #ifndef _PORTABLE_SNPRINTF_H_


00002 #define _PORTABLE_SNPRINTF_H_
00003
00004 #define PORTABLE_SNPRINTF_VERSION_MAJOR 2
00005 #define PORTABLE_SNPRINTF_VERSION_MINOR 2
00006
00007 #ifdef HAVE_SNPRINTF
00008 #include <stdio.h>
00009 #else
00010 extern int snprintf(char *, size_t, const char *, /*args*/ ...);
00011 extern int vsnprintf(char *, size_t, const char *, va_list);
00012 #endif
00013
00014 #if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
00015 extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
00016 extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
00017 #define snprintf portable_snprintf
00018 #define vsnprintf portable_vsnprintf
00019 #endif
00020
00021 extern int asprintf (char **ptr, const char *fmt, /*args*/ ...);
00022 extern int vasprintf (char **ptr, const char *fmt, va_list ap);
00023 extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
00024 extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
00025
00026 #endif

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

snprintf.h 1804
snprintf.h File Reference
Go to the source code of this file.

Defines
#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
#define PORTABLE_SNPRINTF_VERSION_MINOR 2

Functions
int snprintf (char *, size_t, const char *,...)
int vsnprintf (char *, size_t, const char *, va_list)
int asprintf (char **ptr, const char *fmt,...)
int vasprintf (char **ptr, const char *fmt, va_list ap)
int asnprintf (char **ptr, size_t str_m, const char *fmt,...)
int vasnprintf (char **ptr, size_t str_m, const char *fmt, va_list ap)

Define Documentation

#define PORTABLE_SNPRINTF_VERSION_MAJOR 2

#define PORTABLE_SNPRINTF_VERSION_MINOR 2

Function Documentation

int snprintf ( char * ,


size_t ,
const char * ,
...
)

Referenced by OBForceField::ConjugateGradientsInitialize(),
OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(),
OBRotorRules::GetRotorIncrements(), OBAtom::GetType(), OBConversion::IncrementedFileName(),
OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(),
OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(),
OBForceField::RandomRotorSearchNextConformer(), OBRotorList::Setup(),
OBForceField::SteepestDescentInitialize(), OBForceField::SteepestDescentTakeNSteps(),
OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(),
OBForceField::ValidateConjugateGradients(), OBForceField::ValidateSteepestDescent(), and
OBForceField::WeightedRotorSearch().

snprintf.h File Reference 1805


Open Babel: API Documentation

int vsnprintf ( char * ,


size_t ,
const char * ,
va_list
)

int asprintf ( char ** ptr,


const char * fmt,
...
)

int vasprintf ( char ** ptr,


const char * fmt,
va_list ap
)

int asnprintf ( char ** ptr,


size_t str_m,
const char * fmt,
...
)

int vasnprintf ( char ** ptr,


size_t str_m,
const char * fmt,
va_list ap
)

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:

Function Documentation 1806


Open Babel: API Documentation

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

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

Function Documentation 1807


spacegroup.cpp File Reference
Handle Crystallographic Space Groups. More...

#include <openbabel/babelconfig.h>
#include <openbabel/math/spacegroup.h>
#include <openbabel/data.h>
#include <openbabel/obutil.h>
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <locale>
#include <cstdarg>
#include <cstdlib>

Namespaces
namespace OpenBabel

Enumerations
enum { SPACE_GROUP_ID, SPACE_GROUP_HALL,
SPACE_GROUP_HM, SPACE_GROUP_TRANSFORM }

Variables
static SpaceGroups _SpaceGroups

Detailed Description
Handle Crystallographic Space Groups.

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:

spacegroup.cpp File Reference 1808


Open Babel: API Documentation

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

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

Detailed Description 1809


spacegroup.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 spacegroup.h - Handle Crystallographic Space Groups.
00003
00004 Copyright (C) 2007 by Jean Bréfort
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
00010 modify it under the terms of the GNU General Public License as
00011 published by the Free Software Foundation; either version 2 of the
00012 License, or (at your option) any later version.
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_SPACE_GROUP_H
00021 #define OB_SPACE_GROUP_H
00022
00023 #include <openbabel/math/transform3d.h>
00024 #include <string>
00025 #include <list>
00026
00027 namespace OpenBabel
00028 {
00029
00035 class OBAPI SpaceGroup
00036 {
00037 public:
00038 SpaceGroup();
00039 ~SpaceGroup();
00040
00041 void SetHMName(const char *name)
00042 { m_HM = name; }
00043 void SetHMName(const std::string &name)
00044 { m_HM = name; }
00045 void SetHallName(const char *name)
00046 { m_Hall = name; }
00047 void SetHallName(const std::string &name)
00048 { m_Hall = name; }
00049 void SetId(unsigned n)
00050 { m_id = n; }
00051 void AddTransform(const std::string &s);
00052
00053 const std::string & GetHMName() const
00054 { return m_HM;}
00055 const std::string & GetHallName()const
00056 { return m_Hall;}
00057 unsigned GetId() const
00058 { return m_id; }
00059 std::list<vector3> Transform(const vector3 &v) const;
00060

spacegroup.h 1810
Open Babel: API Documentation
00061 transform3d const * BeginTransform(transform3dIterator &i) const;
00062 transform3d const * NextTransform(transform3dIterator &i) const;
00063
00064 // static methods
00065 /* The name might be either a HM or Hall name */
00066 static const SpaceGroup * GetSpaceGroup (char const *name);
00067 static const SpaceGroup * GetSpaceGroup (const std::string &name);
00068 static const SpaceGroup * GetSpaceGroup (unsigned id);
00069 static const SpaceGroup * Find (SpaceGroup* group);
00070 /* Use it if the space group is unknown (might happen if no database has
00071 been loaded or if the HM name is not usual. */
00072 // Unfortunately, this seems to confuse the SWIG parser
00073 // Fortunately, it's not needed for the scripting bindings,
00074 // since this is internal code
00075 #ifndef SWIG
00076 void RegisterSpaceGroup (int nb = 0, ...);
00077 #endif
00078
00079 bool operator ==(const SpaceGroup &) const;
00080 int operator!=(const SpaceGroup &other) const
00081 {
00082 return !((*this) == other);
00083 }
00084 bool IsValid() const;
00085
00086 private:
00087 std::string m_HM, m_Hall;
00088 unsigned int m_id;
00089 std::list<transform3d*> m_transforms;
00090 };
00091
00092 }
00093
00094 #endif // OB_SPACE_GROUP_H
00095

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

spacegroup.h 1811
Open Babel: API Documentation

• Files

spacegroup.h 1812
spacegroup.h File Reference
Handle Crystallographic Space Groups. More...

#include <openbabel/math/transform3d.h>
#include <string>
#include <list>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class SpaceGroup
Handle crystallographic space group symmetry. More...

Detailed Description
Handle Crystallographic Space Groups.

spacegroup.h File Reference 1813


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:54 2008 by 1.5.6.

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

Detailed Description 1814


Getting Started
Not surprisingly, the Open Babel library is a full chemical toolbox. So to start out, the first example is to read
in molecular file data and uses the OBMol, and OBConversion classes. The former is designed to store the
basic information in a molecule and to perceive information and chemical properties. The latter is designed to
handle conversion of a variety of data (i.e., not just molecules) and import and export.

This example program shows how to read in a molecule, check the number of atoms, and write a SMILES
string.

#include <iostream.h>

// Include Open Babel classes for OBMol and OBConversion


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

int main(int argc,char **argv)


{
// Read from STDIN (cin) and Write to STDOUT (cout)
OBConversion conv(&cin,&cout);

// Try to set input format to MDL SD file


// and output to SMILES
if(conv.SetInAndOutFormats("SDF","SMI"))
{
OBMol mol;
if(conv.Read(&mol))
{
// ...manipulate molecule
cerr << " Molecule has: " << mol.NumAtoms()
<< " atoms." << endl;
}

// Write SMILES to the standard output


conv->Write(&mol);
}
return 0; // exit with success
}

All of the main classes, including OBMol and OBConversion, include example code designed to facilitate
using the Open Babel code in real-world chemistry.

For a further list of example code, see the developer tutorials. This section includes examples in C++, Perl,
Python, and other porgramming languages.

Also, the tools directory of the Open Babel source releases include a variety of programs which are
intended to be more advanced examples (although usually still under 300 lines of code).

Please e-mail the openbabel-discuss@lists.sourceforge.net mailing list if you have more questions!

Getting Started 1815


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:54 2008 by 1.5.6.

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

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

Getting Started 1816


AtomSpec Member List
This is the complete list of members for AtomSpec, including all inherited members.

chiral_flag AtomSpec
expr AtomSpec
part AtomSpec
vb AtomSpec
visit AtomSpec

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::AtomSpec

AtomSpec Member List 1817


AtomSpec Struct Reference
An internal (SMARTS parser) atom specification. More...

#include <openbabel/parsmart.h>

List of all members.

Public
Attributes
AtomExpr * expr
int visit
int part
int chiral_flag
int vb

Detailed Description
An internal (SMARTS parser) atom specification.

Member Data Documentation

AtomExpr* expr

Referenced by OpenBabel::ConstrainRecursion(), OpenBabel::CopyPattern(), OpenBabel::CreateAtom(),


OpenBabel::FastSingleMatch(), OpenBabel::FreePattern(), OBSmartsPattern::GetAtomicNum(),
OBSmartsPattern::GetCharge(), OBSSMatch::Match(), OpenBabel::ParseSMARTSPart(), and
OpenBabel::SetupAtomMatchTable().

int visit

Referenced by OpenBabel::TraverseSMARTS().

int part

Referenced by OpenBabel::CopyPattern(), and OpenBabel::CreateAtom().

int chiral_flag

Referenced by OpenBabel::match(), and OpenBabel::ParseSMARTSPart().

AtomSpec Struct Reference 1818


Open Babel: API Documentation

int vb

Referenced by OpenBabel::CreateAtom().

The documentation for this struct was generated from the following file:

• parsmart.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:58 2008 by 1.5.6.

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

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

Member Data Documentation 1819


BondSpec Member List
This is the complete list of members for BondSpec, including all inherited members.

dst BondSpec
expr BondSpec
grow BondSpec
src BondSpec
visit BondSpec

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::BondSpec

BondSpec Member List 1820


BondSpec Struct Reference
An internal (SMARTS parser) bond specification. More...

#include <openbabel/parsmart.h>

List of all members.

Public
Attributes
BondExpr * expr
int src
int dst
int visit
bool grow

Detailed Description
An internal (SMARTS parser) bond specification.

Member Data Documentation

BondExpr* expr

Referenced by OpenBabel::CopyPattern(), OpenBabel::CreateBond(), OpenBabel::FastSingleMatch(),


OpenBabel::FreePattern(), OBSmartsPattern::GetBond(), and OBSSMatch::Match().

int src

Referenced by OpenBabel::CopyPattern(), OpenBabel::CreateBond(), OpenBabel::FastSingleMatch(),


OBSmartsPattern::GetBond(), OpenBabel::MarkGrowBonds(), OBSSMatch::Match(), OpenBabel::match(),
and OpenBabel::TraverseSMARTS().

int dst

Referenced by OpenBabel::CopyPattern(), OpenBabel::CreateBond(), OpenBabel::FastSingleMatch(),


OBSmartsPattern::GetBond(), OpenBabel::MarkGrowBonds(), OBSSMatch::Match(), OpenBabel::match(),
and OpenBabel::TraverseSMARTS().

int visit

BondSpec Struct Reference 1821


Open Babel: API Documentation

Referenced by OpenBabel::TraverseSMARTS().

bool grow

Referenced by OpenBabel::FastSingleMatch(), OpenBabel::MarkGrowBonds(), and OBSSMatch::Match().

The documentation for this struct was generated from the following file:

• parsmart.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:58 2008 by 1.5.6.

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

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

Member Data Documentation 1822


CharPtrLess Member List
This is the complete list of members for CharPtrLess, including all inherited members.

operator()(const char *p1, const char *p2) const CharPtrLess [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::CharPtrLess

CharPtrLess Member List 1823


CharPtrLess Struct Reference
Case insensitive string comparison for PluginMapType key. More...

#include <plugin.h>

List of all members.

Public Member Functions


bool operator() (const char *p1, const char *p2) const

Detailed Description
Case insensitive string comparison for PluginMapType key.

Member Function Documentation

bool operator() ( const char * p1,


const char * p2
) const [inline]

The documentation for this struct was generated from the following file:

• plugin.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:58 2008 by 1.5.6.

• Main Page
• Related Pages

CharPtrLess Struct Reference 1824


Open Babel: API Documentation
• Namespaces
• Classes
• Files

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

Member Function Documentation 1825


DoubleType Member List
This is the complete list of members for DoubleType, including all inherited members.

hi DoubleType
lo DoubleType

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::DoubleType

DoubleType Member List 1826


DoubleType Struct Reference
Used for internal random number generation OBRandom (unless the system random generator is used).
More...

#include <openbabel/rand.h>

List of all members.

Public
Attributes
unsigned int hi
unsigned int lo

Detailed Description
Used for internal random number generation OBRandom (unless the system random generator is used).

Member Data Documentation

unsigned int hi

Referenced by OpenBabel::DoubleAdd(), OpenBabel::DoubleModulus(), and OpenBabel::DoubleMultiply().

unsigned int lo

Referenced by OpenBabel::DoubleAdd(), OpenBabel::DoubleModulus(), and OpenBabel::DoubleMultiply().

The documentation for this struct was generated from the following file:

• rand.h

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

DoubleType Struct Reference 1827


Open Babel: API Documentation

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 1828


FptIndex Member List
This is the complete list of members for FptIndex, including all inherited members.

CheckFP() FptIndex
fptdata FptIndex
header FptIndex
Read(std::istream *pIndexstream) FptIndex
seekdata FptIndex

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::FptIndex

FptIndex Member List 1829


FptIndex Struct Reference
Structure of fastsearch index files. More...

#include <openbabel/fingerprint.h>

List of all members.

Public Member Functions


bool Read (std::istream *pIndexstream)
OBFingerprint * CheckFP ()

Public Attributes
FptIndexHeader header
std::vector< unsigned int > fptdata
std::vector< unsigned int > seekdata

Detailed Description
Structure of fastsearch index files.

Member Function Documentation

std::istream
bool Read ( pIndexstream )
*

Referenced by FastSearch::ReadIndex().

OBFingerprint * CheckFP ( )

Returns:
A pointer to FP used or NULL and an error message

Referenced by FastSearchIndexer::FastSearchIndexer(), and FastSearch::ReadIndex().

Member Data Documentation

FptIndexHeader header

FptIndex Struct Reference 1830


Open Babel: API Documentation

Referenced by FastSearchIndexer::Add(), FptIndex::CheckFP(), FastSearchIndexer::FastSearchIndexer(),


FastSearch::Find(), FastSearch::FindMatch(), FastSearch::FindSimilar(), FptIndex::Read(),
FastSearch::ReadIndex(), and FastSearchIndexer::~FastSearchIndexer().

std::vector<unsigned int> fptdata

Referenced by FastSearchIndexer::Add(), FastSearch::Find(), FastSearch::FindMatch(),


FastSearch::FindSimilar(), FptIndex::Read(), and FastSearchIndexer::~FastSearchIndexer().

std::vector<unsigned int> seekdata

Referenced by FastSearchIndexer::Add(), FastSearch::Find(), FastSearch::FindMatch(),


FastSearch::FindSimilar(), FptIndex::Read(), and FastSearchIndexer::~FastSearchIndexer().

The documentation for this struct 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 Data Documentation 1831


FptIndexHeader Member List
This is the complete list of members for FptIndexHeader, including all inherited members.

datafilename FptIndexHeader
fpid FptIndexHeader
headerlength FptIndexHeader
nEntries FptIndexHeader
words FptIndexHeader

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::FptIndexHeader

FptIndexHeader Member List 1832


FptIndexHeader Struct Reference
Header for fastsearch index file. More...

#include <openbabel/fingerprint.h>

List of all members.

Public Attributes
unsigned int headerlength
unsigned int nEntries
unsigned int words
char fpid [16]
char datafilename [256]

Detailed Description
Header for fastsearch index file.

Member Data Documentation

unsigned int headerlength


offset to data: sizeof(FptIndexHeader)

Referenced by FastSearchIndexer::FastSearchIndexer(), and FptIndex::Read().

unsigned int nEntries


number of fingerprints

Referenced by FastSearch::Find(), FastSearch::FindMatch(), FastSearch::FindSimilar(), FptIndex::Read(), and


FastSearchIndexer::~FastSearchIndexer().

unsigned int words


number 32bit words per fingerprint

Referenced by FastSearchIndexer::Add(), FastSearchIndexer::FastSearchIndexer(), FastSearch::Find(),


FastSearch::FindMatch(), FastSearch::FindSimilar(), and FptIndex::Read().

char fpid[16]
ID of the fingerprint type.

FptIndexHeader Struct Reference 1833


Open Babel: API Documentation

Referenced by FptIndex::CheckFP(), and FastSearchIndexer::FastSearchIndexer().

char datafilename[256]
the data that this is an index to

Referenced by FastSearchIndexer::FastSearchIndexer(), FptIndex::Read(), and FastSearch::ReadIndex().

The documentation for this struct was generated from the following file:

• fingerprint.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:56 2008 by 1.5.6.

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

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

Member Data Documentation 1834


LineSearchType Member List
This is the complete list of members for LineSearchType, including all inherited members.

Newton2Num enum value LineSearchType


Simple enum value LineSearchType

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::LineSearchType

LineSearchType Member List 1835


LineSearchType Struct Reference
The type of line search to be used for optimization -- simple or Newton numeric. More...

#include <forcefield.h>

List of all members.

Public Types
enum { Simple, Newton2Num }

Detailed Description
The type of line search to be used for optimization -- simple or Newton numeric.

Member Enumeration Documentation

anonymous enum

Enumerator:
Simple
Newton2Num

The documentation for this struct was generated from the following file:

• forcefield.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:56 2008 by 1.5.6.

• Main Page

LineSearchType Struct Reference 1836


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

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

Member Enumeration Documentation 1837


Pattern Member List
This is the complete list of members for Pattern, including all inherited members.

aalloc Pattern
acount Pattern
atom Pattern
balloc Pattern
bcount Pattern
bond Pattern
hasExplicitH Pattern
ischiral Pattern
parts Pattern

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::Pattern

Pattern Member List 1838


Pattern Struct Reference
A SMARTS parser internal pattern. More...

#include <openbabel/parsmart.h>

List of all members.

Public
Attributes
int aalloc
int acount
int balloc
int bcount
bool ischiral
AtomSpec * atom
BondSpec * bond
int parts
bool hasExplicitH

Detailed Description
A SMARTS parser internal pattern.

Member Data Documentation

int aalloc

Referenced by OpenBabel::AllocPattern(), OpenBabel::CreateAtom(), and OpenBabel::FreePattern().

int acount

Referenced by OpenBabel::AllocPattern(), OpenBabel::CopyPattern(), OpenBabel::CreateAtom(),


OpenBabel::FastSingleMatch(), OpenBabel::FreePattern(), OpenBabel::match(), OBSSMatch::OBSSMatch(),
OpenBabel::ParseSMARTSPart(), OpenBabel::SetupAtomMatchTable(), and OpenBabel::SMARTSParser().

int balloc

Referenced by OpenBabel::AllocPattern(), OpenBabel::CreateBond(), and OpenBabel::FreePattern().

Pattern Struct Reference 1839


Open Babel: API Documentation

int bcount

Referenced by OpenBabel::AllocPattern(), OpenBabel::CopyPattern(), OpenBabel::CreateBond(),


OpenBabel::FastSingleMatch(), OpenBabel::FreePattern(), OpenBabel::MarkGrowBonds(),
OBSSMatch::Match(), OpenBabel::match(), and OpenBabel::TraverseSMARTS().

bool ischiral

Referenced by OpenBabel::match(), and OpenBabel::ParseSMARTSPart().

AtomSpec* atom

Referenced by OpenBabel::AllocPattern(), OpenBabel::ConstrainRecursion(), OpenBabel::CopyPattern(),


OpenBabel::CreateAtom(), OpenBabel::FastSingleMatch(), OpenBabel::FreePattern(),
OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(), OBSSMatch::Match(),
OpenBabel::match(), OpenBabel::ParseSMARTSPart(), OpenBabel::SetupAtomMatchTable(), and
OpenBabel::TraverseSMARTS().

BondSpec* bond

Referenced by OpenBabel::AllocPattern(), OpenBabel::CopyPattern(), OpenBabel::CreateBond(),


OpenBabel::FastSingleMatch(), OpenBabel::FreePattern(), OBSmartsPattern::GetBond(),
OpenBabel::MarkGrowBonds(), OBSSMatch::Match(), OpenBabel::match(), and
OpenBabel::TraverseSMARTS().

int parts

Referenced by OpenBabel::AllocPattern(), OpenBabel::CopyPattern(), and


OpenBabel::ParseSMARTSPattern().

bool hasExplicitH

Referenced by OpenBabel::AllocPattern(), OBSmartsPattern::Match(), and OpenBabel::SMARTSParser().

The documentation for this struct was generated from the following file:

• parsmart.h

Member Data Documentation 1840


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:58 2008 by 1.5.6.

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

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

OpenBabel::quad

Member Data Documentation 1841


quad Class Template Reference
A 4-element templated, based on the design of the STL pair<>. More...

#include <openbabel/obutil.h>

List of all members.

Public Types
typedef T1 first_type
typedef T2 second_type
typedef T3 third_type
typedef T4 fourth_type

Public Member Functions


quad ()
quad (const T1 &a, const T2 &b, const T3 &c, const T4 &d)
template<class U, class V, class W, class X>
quad (const quad< U, V, W, X > &q)

Public Attributes
T1 first
T2 second
T3 third
T4 fourth

Detailed Description
template<class T1, class T2, class T3, class T4>
class OpenBabel::quad< T1, T2, T3, T4 >

A 4-element templated, based on the design of the STL pair<>.

Member Typedef Documentation

typedef T1 first_type

typedef T2 second_type

quad Class Template Reference 1842


Open Babel: API Documentation

typedef T3 third_type

typedef T4 fourth_type

Constructor & Destructor Documentation

quad ( ) [inline]
default constructor T1() and T2() and T3() force initialization for built in types

quad ( const T1 & a,


const T2 & b,
const T3 & c,
const T4 & d
) [inline]
constructor for 3 values

quad ( const quad< U, V, W, X > & q ) [inline]


copy constructor with implicit conversions

Member Data Documentation

T1 first

Referenced by OBTorsion::AddTorsion(), and OBTorsion::GetTorsions().

T2 second

Referenced by OBTorsion::AddTorsion(), and OBTorsion::GetTorsions().

T3 third

Referenced by OBTorsion::AddTorsion(), and OBTorsion::GetTorsions().

T4 fourth

Referenced by OBTorsion::AddTorsion(), and OBTorsion::GetTorsions().

The documentation for this class was generated from the following file:

Member Typedef Documentation 1843


Open Babel: API Documentation

• obutil.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

OpenBabel::triple

Member Data Documentation 1844


triple Class Template Reference
A 3-element templated, based on the design of the STL pair<>. More...

#include <openbabel/obutil.h>

List of all members.

Public Types
typedef T1 first_type
typedef T2 second_type
typedef T3 third_type

Public Member Functions


triple ()
triple (const T1 &a, const T2 &b, const T3 &c)
template<class U, class V, class W>
triple (const triple< U, V, W > &t)

Public Attributes
T1 first
T2 second
T3 third

Detailed Description
template<class T1, class T2, class T3>
class OpenBabel::triple< T1, T2, T3 >

A 3-element templated, based on the design of the STL pair<>.

Member Typedef Documentation

typedef T1 first_type

typedef T2 second_type

typedef T3 third_type

triple Class Template Reference 1845


Open Babel: API Documentation

Constructor & Destructor Documentation

triple ( ) [inline]
Default constructor T1() and T2() and T3() force initialization for built in types

triple ( const T1 & a,


const T2 & b,
const T3 & c
) [inline]
Constructor for 3 values.

triple ( const triple< U, V, W > & t ) [inline]


Copy constructor with implicit conversions.

Member Data Documentation

T1 first

Referenced by OBAngle::GetAtoms(), and OBAngle::SetAtoms().

T2 second

Referenced by OBAngle::GetAtoms(), and OBAngle::SetAtoms().

T3 third

Referenced by OBAngle::GetAtoms(), and OBAngle::SetAtoms().

The documentation for this class was generated from the following file:

• obutil.h

Member Typedef Documentation 1846


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

Member Data Documentation 1847


Todo List

Member OpenBabel::matrix3x3::PlaneReflection (const vector3 &norm)


Replace this method with a more fool-proof version.

Member OpenBabel::matrix3x3::RotAboutAxisByAngle (const vector3 &axis, const double angle)


Replace this method with a more fool-proof version.

Member OpenBabel::OBRing::IsAromatic ()
This method uses implicit bonding -- bond info is not stored in OBRing

Member OpenBabel::OBRing::IsMember (OBBond *b)


This method uses implicit bonding -- bond info is not stored in OBRing

Class OBSymmetryData
Add support for translation between symbol notations. Add symmetry perception routines.

Member OpenBabel::OBTorsionData::Clone (OBBase *) const


Needs to be updated to rebase atom pointers (or use indexes)

Member OpenBabel::vector3::operator*= (const matrix3x3 &)


Currently unimplemented

File bondtyper.cpp
Needs to add aromatic ring bond order assignment. Eventually need to migrate
OBMol::PerceiveBondOrders(), OBMol::ConnectTheDots(), and possibly some of the Kekulize
routines

Member SetRotorToAngle
This code is identical to OBMol::SetTorsion() and should be combined

Member vectorAngle
Replace this method with a more fool-proof version.

Todo List 1848


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:54 2008 by 1.5.6.

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

Todo List 1849


tokenst.cpp File Reference
Tokenize a string. More...

#include <openbabel/babelconfig.h>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <openbabel/tokenst.h>

Namespaces
namespace OpenBabel

Functions
OBERROR bool tokenize (std::vector< std::string > &, const char *buf, const char
*delimstr=" \t\n\r")
char * trim_spaces (char *string)
OBERROR bool tokenize (std::vector< std::string > &, std::string &, const char
*delimstr=" \t\n\r", int limit=-1)
OBERROR std::string & Trim (std::string &txt)
OBERROR std::string OpenDatafile (std::ifstream &fs, const std::string &filename, const
std::string &envvar="BABEL_DATADIR")

Detailed Description
Tokenize a string.

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.

tokenst.cpp File Reference 1850


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

Detailed Description 1851


tokenst.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 tokenst.h - Tokenize and trim strings; Open data files
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_TOKENST_H
00021 #define OB_TOKENST_H
00022
00023 #include <openbabel/babelconfig.h>
00024 #include <vector>
00025 #include <string>
00026 #include <fstream>
00027
00028 namespace OpenBabel
00029 {
00030 // Utility function prototypes
00031 OBERROR bool tokenize(std::vector<std::string>&, const char *buf, const char *delimstr="
00032 OBERROR bool tokenize(std::vector<std::string>&, std::string&, const char *delimstr=" \t
00033 // Remove leading and trailing whitespace from a string (docs in tokenst.cpp)
00034 OBERROR std::string& Trim(std::string& txt);
00035
00037 // full documentation in tokenst.cpp
00038 OBERROR std::string OpenDatafile(std::ifstream& fs,
00039 const std::string& filename,
00040 const std::string& envvar = "BABEL_DATADIR");
00041
00042 // Used by other code for reading files
00043 #ifdef WIN32
00044 #define FILE_SEP_CHAR "\\"
00045 #else
00046 #define FILE_SEP_CHAR "/"
00047 #endif
00048
00049
00050 }//namespace
00051 #endif
00052

tokenst.h 1852
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

tokenst.h 1853
tokenst.h File Reference
Tokenize strings, open data files. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <string>
#include <fstream>

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

Go to the source code of this file.

Namespaces
namespace OpenBabel

Defines
#define FILE_SEP_CHAR "/"

tokenst.h File Reference 1854


Open Babel: API Documentation

Functions
OBERROR bool tokenize (std::vector< std::string > &, const char *buf, const char
*delimstr=" \t\n\r")
OBERROR bool tokenize (std::vector< std::string > &, std::string &, const char
*delimstr=" \t\n\r", int limit=-1)
OBERROR std::string & Trim (std::string &txt)
OBERROR std::string OpenDatafile (std::ifstream &fs, const std::string &filename, const
std::string &envvar="BABEL_DATADIR")

Detailed Description
Tokenize strings, open data files.

Define Documentation

#define FILE_SEP_CHAR "/"

Referenced by OpenBabel::OpenDatafile(), and patty::read_rules().

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

Functions 1855
transform3d.cpp File Reference
Handle 3D transformations in space groups. More...

#include <openbabel/babelconfig.h>
#include <openbabel/math/transform3d.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle 3D transformations in space groups.

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

transform3d.cpp File Reference 1856


transform3d.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 transform3d.h - Handle 3D transformations in space groups.
00003
00004 Copyright (C) 2007 by Jean Bréfort
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
00010 modify it under the terms of the GNU General Public License as
00011 published by the Free Software Foundation; either version 2 of the
00012 License, or (at your option) any later version.
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_TRANSFORM_3D_H
00021 #define OB_TRANSFORM_3D_H
00022
00023 #include <openbabel/math/matrix3x3.h>
00024 #include <list>
00025 #include <string>
00026
00027 namespace OpenBabel
00028 {
00029
00035 class OBAPI transform3d: private matrix3x3, private vector3
00036 {
00037 public:
00038 transform3d(void): matrix3x3(), vector3()
00039 {
00040 }
00041
00042 transform3d(const matrix3x3 &m, const vector3 &v): matrix3x3(m), vector3(v)
00043 {
00044 Normalize();
00045 }
00046
00047 transform3d(double s): matrix3x3(s), vector3()
00048 {
00049 }
00050
00052 transform3d(vector3 row1,vector3 row2,vector3 row3,vector3 translation):
00053 matrix3x3(row1, row2, row3), vector3(translation)
00054 {
00055 Normalize();
00056 }
00057
00059
00060 transform3d(double d[3][3], double t[3]): matrix3x3(d), vector3(t)
00061 {
00062 Normalize();

transform3d.h 1857
Open Babel: API Documentation
00063 }
00064
00065 vector3 operator *(const vector3 &);
00066
00067 transform3d operator *(const transform3d &);
00068
00069 std::string DescribeAsString() const;
00070 std::string DescribeAsValues() const;
00071
00072 void Normalize();
00073 };
00074
00075 typedef std::list<transform3d*>::const_iterator transform3dIterator;
00076
00077 }
00078
00079 #endif // OB_TRANSFORM_3D_H
00080

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

transform3d.h 1858
transform3d.h File Reference
Handle 3D transformations in space groups. More...

#include <openbabel/math/matrix3x3.h>
#include <list>
#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 transform3d
Handle 3D transformations, such as space group definitions. More...

Typedefs
typedef std::list< transform3d * >
::const_iterator transform3dIterator

Detailed Description
Handle 3D transformations in space groups.

transform3d.h File Reference 1859


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:54 2008 by 1.5.6.

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

Detailed Description 1860


transform.cpp File Reference
Perform command-line requested transformations for OBMol and SMARTS filtering. More...

#include <openbabel/babelconfig.h>
#include <sstream>
#include <openbabel/mol.h>
#include <openbabel/descriptor.h>
#include <openbabel/op.h>

Namespaces
namespace OpenBabel

Detailed Description
Perform command-line requested transformations for OBMol and SMARTS filtering.

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

transform.cpp File Reference 1861


typer.cpp File Reference
Open Babel atom and aromaticity typer. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/typer.h>
#include "atomtyp.h"
#include "aromatic.h"

Namespaces
namespace OpenBabel

Detailed Description
Open Babel atom and aromaticity typer.

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

typer.cpp File Reference 1862


typer.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 typer.h - Open Babel atom and aromaticity typer.
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_TYPER_H
00021 #define OB_TYPER_H
00022
00023 #include <openbabel/parsmart.h>
00024 #include <openbabel/data.h>
00025
00026 namespace OpenBabel
00027 {
00028
00029 // class introduction in typer.cpp
00030 class OBAPI OBAtomTyper : public OBGlobalDataBase
00031 {
00032 // int _rc;
00033 std::vector<std::vector<int> > _mlist;
00034 std::vector<std::pair<OBSmartsPattern*,int> > _vinthyb;
00035 std::vector<std::pair<OBSmartsPattern*,int> > _vimpval;
00036 std::vector<std::pair<OBSmartsPattern*,std::string> > _vexttyp;
00037
00038 public:
00039 OBAtomTyper();
00040 ~OBAtomTyper();
00041
00042 void ParseLine(const char*);
00044 unsigned int GetSize() { return _vimpval.size();}
00045
00047 void AssignHyb(OBMol&);
00049 void AssignTypes(OBMol&);
00052 void AssignImplicitValence(OBMol&);
00054 void CorrectAromaticNitrogens(OBMol&);
00055 };
00056
00057 // class introduction in typer.cpp
00058 class OBAPI OBAromaticTyper : public OBGlobalDataBase
00059 {
00060 std::vector<bool> _vpa;
00061 std::vector<bool> _visit;

typer.h 1863
Open Babel: API Documentation
00062 std::vector<bool> _root;
00063 std::vector<std::vector<int> > _mlist;
00064 std::vector<OBSmartsPattern*> _vsp;
00065 std::vector<std::pair<int,int> > _verange;
00066 std::vector<std::pair<int,int> > _velec;
00067 public:
00068 OBAromaticTyper();
00069 ~OBAromaticTyper();
00070
00072 unsigned int GetSize() { return _vsp.size();}
00073
00074 void ParseLine(const char*);
00076 void AssignAromaticFlags(OBMol &);
00079 void PropagatePotentialAromatic(OBAtom*);
00080 // Documentation in typer.cpp
00081 void SelectRootAtoms(OBMol &, bool avoidInnerRingAtoms = true);
00083 void ExcludeSmallRing(OBMol &);
00085 void CheckAromaticity(OBAtom *root,int searchDepth);
00086 // Documentation in typer.cpp
00087 bool TraverseCycle(OBAtom *root, OBAtom *atom, OBBond *prev,
00088 std::pair<int,int> &er,int depth);
00089 };
00090
00091 // class introduction in typer.cpp
00092 class OBAPI OBRingTyper : public OBGlobalDataBase
00093 {
00094 std::vector<std::vector<int> > _mlist;
00095 std::vector<std::pair<OBSmartsPattern*,std::string> > _ringtyp;
00096
00097 public:
00098 OBRingTyper();
00099 ~OBRingTyper();
00100
00101 void ParseLine(const char*);
00103 unsigned int GetSize() { return _ringtyp.size();}
00104
00106 void AssignTypes(OBMol&);
00107 };
00108
00109
00110 } //namespace OpenBabel
00111
00112 #endif // OB_TYPER_H
00113

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:

typer.h 1864
Open Babel: API Documentation

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

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

typer.h 1865
typer.h File Reference
Open Babel atom and aromaticity typer. 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 OBAtomTyper
Assigns atom types, hybridization, implicit valence and formal charges. More...
class OBAromaticTyper
Assigns aromatic typing to atoms and bonds. More...
class OBRingTyper

typer.h File Reference 1866


Open Babel: API Documentation

Assigns ring types. More...

Detailed Description
Open Babel atom and aromaticity typer.

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

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

Classes 1867
_AtomExpr Member List
This is the complete list of members for _AtomExpr, including all inherited members.

arg _AtomExpr
bin _AtomExpr
leaf _AtomExpr
lft _AtomExpr
mon _AtomExpr
prop _AtomExpr
recur _AtomExpr
recur _AtomExpr
rgt _AtomExpr
type _AtomExpr
value _AtomExpr

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::_AtomExpr

_AtomExpr Member List 1868


_AtomExpr Union Reference
An internal (SMARTS parser) atomic expression. More...

#include <openbabel/parsmart.h>

List of all members.

Public Attributes
int type
struct {
int type
int prop
int value
} leaf
struct {
int type
void * recur
} recur
struct {
int type
union _AtomExpr * arg
} mon
struct {
int type
union _AtomExpr * lft
union _AtomExpr * rgt
} bin

Detailed Description
An internal (SMARTS parser) atomic expression.

Member Data Documentation

int type

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomExprConflict(),


OpenBabel::AtomExprImplied(), OpenBabel::AtomExprImplies(), OpenBabel::AtomLeafConflict(),
OpenBabel::AtomLeafImplies(), OpenBabel::BuildAtomBin(), OpenBabel::BuildAtomLeaf(),
OpenBabel::BuildAtomNot(), OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(),
OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(), OBSmartsPattern::GetAtomicNum(),
OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(), OpenBabel::IsInvalidAtom(),
OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), and OpenBabel::OrderAtomExpr().

_AtomExpr Union Reference 1869


Open Babel: API Documentation

int prop

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomLeafConflict(),


OpenBabel::AtomLeafImplies(), OpenBabel::BuildAtomLeaf(), OpenBabel::CopyAtomExpr(),
OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetAtomicNum(),
OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(), OpenBabel::IsBooleanAtomLeaf(),
OpenBabel::IsInvalidAtom(), OpenBabel::IsNegatingAtomLeaf(), OpenBabel::OrAtomExpr(), and
OpenBabel::OrderAtomExpr().

int value

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomLeafConflict(),


OpenBabel::AtomLeafImplies(), OpenBabel::BuildAtomLeaf(), OpenBabel::CopyAtomExpr(),
OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetAtomicNum(),
OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(), OpenBabel::IsInvalidAtom(),
OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), and OpenBabel::OrderAtomExpr().

struct { ... } leaf

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomLeafConflict(),


OpenBabel::AtomLeafImplies(), OpenBabel::BuildAtomLeaf(), OpenBabel::CopyAtomExpr(),
OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(), OBSmartsPattern::GetAtomicNum(),
OBSmartsPattern::GetCharge(), OpenBabel::GetChiralFlag(), OpenBabel::IsBooleanAtomLeaf(),
OpenBabel::IsInvalidAtom(), OpenBabel::IsNegatingAtomLeaf(), OpenBabel::NotAtomExpr(),
OpenBabel::OrAtomExpr(), and OpenBabel::OrderAtomExpr().

void* recur

Referenced by OpenBabel::BuildAtomRecurs(), OpenBabel::ConstrainRecursion(),


OpenBabel::CopyAtomExpr(), OpenBabel::EvalAtomExpr(), and OpenBabel::FreeAtomExpr().

struct { ... } recur

union _AtomExpr* arg [write]

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::BuildAtomNot(), OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(),
OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(), OpenBabel::GetChiralFlag(),
OpenBabel::NotAtomExpr(), and OpenBabel::OrderAtomExpr().

struct { ... } mon

Member Data Documentation 1870


Open Babel: API Documentation

Referenced by OpenBabel::AtomLeafConflict(), OpenBabel::AtomLeafImplies(),


OpenBabel::BuildAtomNot(), OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(),
OpenBabel::EvalAtomExpr(), OpenBabel::FreeAtomExpr(), OpenBabel::GetChiralFlag(),
OpenBabel::NotAtomExpr(), and OpenBabel::OrderAtomExpr().

union _AtomExpr* lft [write]

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomExprConflict(),


OpenBabel::AtomExprImplied(), OpenBabel::AtomExprImplies(), OpenBabel::BuildAtomBin(),
OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(),
OpenBabel::FreeAtomExpr(), OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(),
OpenBabel::GetChiralFlag(), OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), and
OpenBabel::OrderAtomExpr().

union _AtomExpr* rgt [write]

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomExprConflict(),


OpenBabel::AtomExprImplied(), OpenBabel::AtomExprImplies(), OpenBabel::BuildAtomBin(),
OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(),
OpenBabel::FreeAtomExpr(), OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(),
OpenBabel::GetChiralFlag(), OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), and
OpenBabel::OrderAtomExpr().

struct { ... } bin

Referenced by OpenBabel::AndAtomExpr(), OpenBabel::AtomExprConflict(),


OpenBabel::AtomExprImplied(), OpenBabel::AtomExprImplies(), OpenBabel::BuildAtomBin(),
OpenBabel::CopyAtomExpr(), OpenBabel::EqualAtomExpr(), OpenBabel::EvalAtomExpr(),
OpenBabel::FreeAtomExpr(), OBSmartsPattern::GetAtomicNum(), OBSmartsPattern::GetCharge(),
OpenBabel::GetChiralFlag(), OpenBabel::NotAtomExpr(), OpenBabel::OrAtomExpr(), and
OpenBabel::OrderAtomExpr().

The documentation for this union was generated from the following file:

• parsmart.h

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

Member Data Documentation 1871


Open Babel: API Documentation

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 1872


_BondExpr Member List
This is the complete list of members for _BondExpr, including all inherited members.

arg _BondExpr
bin _BondExpr
leaf _BondExpr
lft _BondExpr
mon _BondExpr
prop _BondExpr
rgt _BondExpr
type _BondExpr
value _BondExpr

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::_BondExpr

_BondExpr Member List 1873


_BondExpr Union Reference
An internal (SMARTS parser) bond expression. More...

#include <openbabel/parsmart.h>

List of all members.

Public Attributes
int type
struct {
int type
int prop
int value
} leaf
struct {
int type
union _BondExpr * arg
} mon
struct {
int type
union _BondExpr * lft
union _BondExpr * rgt
} bin

Detailed Description
An internal (SMARTS parser) bond expression.

Member Data Documentation

int type

Referenced by OpenBabel::BuildBondBin(), OpenBabel::BuildBondLeaf(), OpenBabel::BuildBondNot(),


OpenBabel::CopyBondExpr(), OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(),
OpenBabel::FreeBondExpr(), OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

int prop

Referenced by OpenBabel::BuildBondLeaf(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), and
OpenBabel::GetExprOrder().

_BondExpr Union Reference 1874


Open Babel: API Documentation

int value

Referenced by OpenBabel::BuildBondLeaf(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), and
OpenBabel::GetExprOrder().

struct { ... } leaf

Referenced by OpenBabel::BuildBondLeaf(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::GetBondLeafIndex(), and
OpenBabel::GetExprOrder().

union _BondExpr* arg [write]

Referenced by OpenBabel::BuildBondNot(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(), and
OpenBabel::GetBondExprIndex().

struct { ... } mon

Referenced by OpenBabel::BuildBondNot(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(), and
OpenBabel::GetBondExprIndex().

union _BondExpr* lft [write]

Referenced by OpenBabel::BuildBondBin(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(),
OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

union _BondExpr* rgt [write]

Referenced by OpenBabel::BuildBondBin(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(),
OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

struct { ... } bin

Referenced by OpenBabel::BuildBondBin(), OpenBabel::CopyBondExpr(),


OpenBabel::EquivalentBondExpr(), OpenBabel::EvalBondExpr(), OpenBabel::FreeBondExpr(),
OpenBabel::GetBondExprIndex(), and OpenBabel::GetExprOrder().

The documentation for this union was generated from the following file:

Member Data Documentation 1875


Open Babel: API Documentation

• parsmart.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:58 2008 by 1.5.6.

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

Member Data Documentation 1876


vector3.cpp File Reference
Handle 3D coordinates. More...

#include <openbabel/babelconfig.h>
#include <iostream>
#include <openbabel/math/vector3.h>
#include <openbabel/obutil.h>

Namespaces
namespace OpenBabel

Functions
std::ostream & operator<< (std::ostream &, const vector3 &)
vector3 cross (const vector3 &, const vector3 &)
double vectorAngle (const vector3 &v1, const vector3 &v2)
double CalcTorsionAngle (const vector3 &a, const vector3 &b, const vector3 &c, const vector3 &d)
const vector3 VZero (0.0, 0.0, 0.0)
const vector3 VX (1.0, 0.0, 0.0)
const vector3 VY (0.0, 1.0, 0.0)
const vector3 VZ (0.0, 0.0, 1.0)
double Point2Plane (vector3 a, vector3 b, vector3 c, vector3 d)
double Point2PlaneAngle (const vector3 a, const vector3 b, const vector3 c, const vector3 d)

Detailed Description
Handle 3D coordinates.

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.

vector3.cpp File Reference 1877


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

Detailed Description 1878


vector3.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 vector3.h - Handle 3D coordinates.
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) 2006 by Benoit Jacob
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_VECTOR_H
00022 #define OB_VECTOR_H
00023
00024 #include <ostream>
00025 #include <math.h>
00026 #include <iostream>
00027
00028 #include <openbabel/rand.h>
00029
00030 #ifndef RAD_TO_DEG
00031 #define RAD_TO_DEG (180.0/M_PI)
00032 #endif
00033
00034 #ifndef DEG_TO_RAD
00035 #define DEG_TO_RAD (M_PI/180.0)
00036 #endif
00037
00038 namespace OpenBabel
00039 {
00040
00041 class matrix3x3; // declared in math/matrix3x3.h
00042 class OBRandom; // declared in rand.h
00043
00044 // class introduction in vector3.cpp
00045 class OBAPI vector3
00046 {
00047 private :
00048 double _vx, _vy, _vz ;
00049
00050 public :
00052 vector3 (const double inX=0.0, const double inY=0.0, const double inZ=0.0):
00053 _vx(inX), _vy(inY), _vz(inZ)
00054 {}
00055 vector3 (double inV[3]):
00056 _vx(inV[0]), _vy(inV[1]), _vz(inV[2])

vector3.h 1879
Open Babel: API Documentation
00057 {}
00059 vector3 (const vector3& v):
00060 _vx(v._vx), _vy(v._vy), _vz(v._vz)
00061 { }
00062
00064 ~vector3() { }
00065
00067 void Set(const double inX, const double inY, const double inZ)
00068 {
00069 _vx = inX;
00070 _vy = inY;
00071 _vz = inZ;
00072 }
00074 void Set(const double *c)
00075 {
00076 _vx = c[0];
00077 _vy = c[1];
00078 _vz = c[2];
00079 }
00081 void SetX(const double inX)
00082 {
00083 _vx = inX;
00084 }
00086 void SetY(const double inY)
00087 {
00088 _vy = inY;
00089 }
00091 void SetZ(const double inZ)
00092 {
00093 _vz = inZ;
00094 }
00097 void Get(double *c)
00098 {
00099 c[0]=_vx;
00100 c[1]=_vy;
00101 c[2]=_vz;
00102 }
00104 double operator[] ( unsigned int i) const;
00105
00107 vector3& operator= ( const vector3& v)
00108 {
00109 _vx = v._vx;
00110 _vy = v._vy;
00111 _vz = v._vz;
00112 return *this;
00113 }
00114
00116 const double *AsArray() const
00117 {
00118 return &_vx;
00119 }
00120
00123 vector3& operator+= ( const vector3& v)
00124 {
00125 _vx += v._vx;
00126 _vy += v._vy;
00127 _vz += v._vz;
00128 return *this;
00129 };
00132 vector3& operator-= ( const vector3& v)
00133 {

vector3.h 1880
Open Babel: API Documentation
00134 _vx -= v._vx;
00135 _vy -= v._vy;
00136 _vz -= v._vz;
00137 return *this;
00138 };
00141 vector3& operator+= ( const double* f)
00142 {
00143 _vx += f[0];
00144 _vy += f[1];
00145 _vz += f[2];
00146 return *this;
00147 };
00150 vector3& operator-= ( const double* f)
00151 {
00152 _vx -= f[0];
00153 _vy -= f[1];
00154 _vz -= f[2];
00155 return *this;
00156 };
00159 vector3& operator*= ( const double& c)
00160 {
00161 _vx *= c;
00162 _vy *= c;
00163 _vz *= c;
00164 return *this;
00165 };
00166
00169 vector3& operator/= ( const double& c)
00170 {
00171 double inv = 1.0 / c;
00172 return( (*this) *= inv );
00173 };
00177 vector3& operator*= ( const matrix3x3 &);
00178
00180 void randomUnitVector(OBRandom *oeRand= NULL);
00181
00182 // Member Functions
00183
00186 vector3& normalize () ;
00187
00189 bool CanBeNormalized () const;
00190
00192 inline double length_2 () const
00193 {
00194 return _vx*_vx + _vy*_vy + _vz*_vz;
00195 };
00197 double length () const
00198 {
00199 return sqrt( length_2() );
00200 };
00202 const double & x () const
00203 {
00204 return _vx ;
00205 } ;
00207 const double & y () const
00208 {
00209 return _vy ;
00210 } ;
00212 const double & z () const
00213 {
00214 return _vz ;

vector3.h 1881
Open Babel: API Documentation
00215 } ;
00217 double & x ()
00218 {
00219 return _vx ;
00220 } ;
00222 double & y ()
00223 {
00224 return _vy ;
00225 } ;
00227 double & z ()
00228 {
00229 return _vz ;
00230 } ;
00231
00233 // @{
00238 int operator== ( const vector3& ) const;
00242 int operator!= ( const vector3& other ) const
00243 {
00244 return ! ( (*this) == other );
00245 }
00255 bool IsApprox( const vector3 & other, const double & precision ) const;
00257
00259
00261 double distSq(const vector3 &vv) const
00262 {
00263 double dx = x() - vv.x();
00264 double dy = y() - vv.y();
00265 double dz = z() - vv.z();
00266 return( dx*dx + dy*dy + dz*dz );
00267 }
00268
00271 bool createOrthoVector(vector3 &v) const;
00272
00273 };
00274
00276 OBAPI std::ostream& operator<< ( std::ostream&, const vector3& );
00277
00278 // Sum, Difference, Scalar Product
00280 inline OBAPI vector3 operator+ ( const vector3& v1, const vector3& v2)
00281 {
00282 return vector3(v1.x()+v2.x(), v1.y()+v2.y(), v1.z()+v2.z());
00283 }
00285 inline OBAPI vector3 operator- ( const vector3& v1, const vector3& v2)
00286 {
00287 return vector3(v1.x()-v2.x(), v1.y()-v2.y(), v1.z()-v2.z());
00288 }
00290 inline OBAPI vector3 operator- ( const vector3& v)
00291 {
00292 return vector3(-v.x(), -v.y(), -v.z());
00293 }
00295 inline OBAPI vector3 operator* ( const double& c, const vector3& v)
00296 {
00297 return vector3( c*v.x(), c*v.y(), c*v.z());
00298 }
00300 inline OBAPI vector3 operator* ( const vector3& v, const double& c)
00301 {
00302 return vector3( c*v.x(), c*v.y(), c*v.z());
00303 }
00305 inline OBAPI vector3 operator/ ( const vector3& v, const double& c)
00306 {
00307 return vector3( v.x()/c, v.y()/c, v.z()/c);

vector3.h 1882
Open Babel: API Documentation
00308 }
00309 // @removed@ misleading operation
00310 // friend vector3 operator* ( const vector3 &,const vector3 &);
00311
00312 //vector and matrix ops
00313 // @removed@ misleading operation; matrix multiplication is not commutitative
00314 // friend vector3 operator *(const vector3 &v,const matrix3x3 &m);
00315
00317 OBAPI vector3 operator *(const matrix3x3 &m, const vector3 &v);
00318
00320 inline OBAPI double dot ( const vector3& v1, const vector3& v2 )
00321 {
00322 return v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z() ;
00323 }
00325 OBAPI vector3 cross ( const vector3&, const vector3& );
00326
00328 OBAPI double vectorAngle ( const vector3& v1, const vector3& v2 );
00329
00331 OBAPI double CalcTorsionAngle(const vector3 &a, const vector3 &b,
00332 const vector3 &c, const vector3 &d);
00333
00335 OBAPI double Point2Plane(vector3 a, vector3 b, vector3 c, vector3 d);
00337 OBAPI double Point2PlaneAngle(const vector3 a, const vector3 b, const vector3 c, const
00338
00339 // The global constant vector3 objects
00341 extern OBAPI const vector3 VZero;
00343 extern OBAPI const vector3 VX;
00345 extern OBAPI const vector3 VY;
00347 extern OBAPI const vector3 VZ;
00348
00349 }
00350
00351 #endif // OB_VECTOR_H
00352

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

vector3.h 1883
vector3.h File Reference
Handle 3D coordinates. More...

#include <ostream>
#include <math.h>
#include <iostream>
#include <openbabel/rand.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 vector3
Represents a vector in 3-dimensional real space. More...

vector3.h File Reference 1884


Open Babel: API Documentation

Defines
#define RAD_TO_DEG (180.0/M_PI)
#define DEG_TO_RAD (M_PI/180.0)

Functions
std::ostream & operator<< (std::ostream &, const vector3 &)
vector3 operator+ (const vector3 &v1, const vector3 &v2)
vector3 operator- (const vector3 &v1, const vector3 &v2)
vector3 operator- (const vector3 &v)
vector3 operator* (const double &c, const vector3 &v)
vector3 operator* (const vector3 &v, const double &c)
vector3 operator/ (const vector3 &v, const double &c)
vector3 operator* (const matrix3x3 &m, const vector3 &v)
double dot (const vector3 &v1, const vector3 &v2)
vector3 cross (const vector3 &, const vector3 &)
double vectorAngle (const vector3 &v1, const vector3 &v2)
double CalcTorsionAngle (const vector3 &a, const vector3 &b, const vector3 &c, const vector3 &d)
double Point2Plane (vector3 a, vector3 b, vector3 c, vector3 d)
double Point2PlaneAngle (const vector3 a, const vector3 b, const vector3 c, const vector3 d)

Variables
const vector3 VZero
const vector3 VX
const vector3 VY
const vector3 VZ

Detailed Description
Handle 3D coordinates.

Define Documentation

#define RAD_TO_DEG (180.0/M_PI)

#define DEG_TO_RAD (M_PI/180.0)

Defines 1885
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:54 2008 by 1.5.6.

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

Define Documentation 1886


xml.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 xml.h Declaration of XMLConversion,
00003 declaration and definition of XMLBaseFormat and XMLMoleculeFormat
00004 Copyright (C) 2005-2006 by Chris Morley
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 #include <openbabel/mol.h>
00017 #include <openbabel/obconversion.h>
00018 #include <openbabel/obmolecformat.h>
00019
00020 #include <libxml/xmlreader.h>
00021 #include <libxml/xmlwriter.h>
00022 #include <typeinfo>
00023
00024 namespace OpenBabel
00025 {
00026
00027
00028 //forward declaration
00029 class XMLBaseFormat;
00030
00031 //******************************************************
00048 class XMLConversion : public OBConversion
00049 {
00050 public:
00052 XMLConversion(OBConversion* pConv);
00053
00055 ~XMLConversion();
00056
00057 bool SetupReader();
00058 bool SetupWriter();
00059
00061 bool ReadXML(XMLBaseFormat* pFormat, OBBase* pOb);
00062
00065 int SkipXML(const char* ctag);
00066
00067 typedef std::map<std::string, XMLBaseFormat*> NsMapType;
00068
00071 static NsMapType& Namespaces()
00072 {
00073 static NsMapType* nsm = NULL;
00074 if (!nsm)
00075 nsm = new NsMapType;
00076 return *nsm;
00077 };
00078

xml.h 1887
Open Babel: API Documentation
00079 static void RegisterXMLFormat(XMLBaseFormat* pFormat,
00080 bool IsDefault=false, const char* uri=NULL);
00081
00083 static XMLConversion* GetDerived(OBConversion* pConv, bool ForReading=true);
00084
00087 bool IsLast()
00088 { return _pConv->IsLast(); }
00089 int GetOutputIndex()
00090 { return _pConv->GetOutputIndex(); }
00091
00092
00093 xmlTextReaderPtr GetReader() const
00094 { return _reader; };
00095
00096 xmlTextWriterPtr GetWriter() const
00097 { return _writer; };
00098
00099 void OutputToStream()
00100 {
00101 xmlOutputBufferFlush(_buf);
00102 }
00103
00104 static XMLBaseFormat* GetDefaultXMLClass() //TODO make dependent on object type
00105 { return _pDefault;};
00106
00107 void LookForNamespace()
00108 { _LookingForNamespace = true; };
00109
00111 static int ReadStream(void * context, char * buffer, int len);
00112 static int WriteStream(void * context, const char * buffer, int len);
00113 //static int CloseStream(void* context);
00114
00115 std::string GetAttribute(const char* attrname);
00116
00118 std::string GetContent();
00119
00121 bool GetContentInt(int& value);
00122
00124 bool GetContentDouble(double& value);
00125
00126 private:
00127 static XMLBaseFormat* _pDefault;
00128 OBConversion* _pConv;
00129 std::streampos _requestedpos, _lastpos;
00130 xmlTextReaderPtr _reader;
00131 xmlTextWriterPtr _writer;
00132 xmlOutputBufferPtr _buf;
00133 // xmlBufferPtr _buf;
00134 bool _LookingForNamespace;
00135 public:
00136 bool _SkipNextRead;
00137 };
00138
00139 //*************************************************
00142 class XMLBaseFormat : public OBFormat
00143 {
00144 protected:
00145 XMLConversion* _pxmlConv;
00146
00147 //formating for output
00148 std::string _prefix;

xml.h 1888
Open Babel: API Documentation
00149 int baseindent, ind;
00150 std::string nsdecl;
00151 int _embedlevel;
00152
00153 public:
00154 ~XMLBaseFormat(){}
00155 virtual const char* NamespaceURI()const=0;
00156 virtual bool DoElement(const std::string& ElName){return false;};
00157 virtual bool EndElement(const std::string& ElName){return false;};
00159 virtual const char* EndTag(){return ">";};
00160
00161 protected:
00162 xmlTextReaderPtr reader() const
00163 {
00164 return _pxmlConv->GetReader();
00165 }
00166
00167 xmlTextWriterPtr writer() const
00168 {
00169 return _pxmlConv->GetWriter();
00170 }
00171
00172 void OutputToStream()
00173 {
00174 _pxmlConv->OutputToStream();
00175 }
00176
00179 virtual int SkipObjects(int n, OBConversion* pConv)
00180 {
00181 //don't implement on base class
00182 if(*EndTag()=='>')
00183 return 0;
00184
00185 //Set up XMLConversion class with reader
00186 _pxmlConv = XMLConversion::GetDerived(pConv,true);
00187 if(!_pxmlConv)
00188 return -1;
00189
00190 //always find the end of at least 1 object
00191 if(n==0)++n;
00192
00193 //Skip n objects, returning -1 if not successful
00194 int i;
00195 for(i=0; i<n; ++i)
00196 if(_pxmlConv->SkipXML(EndTag())!=1)
00197 return -1;
00198
00199 return 1;
00200 }
00201
00202 };
00203
00204 //*************************************************
00207 class XMLMoleculeFormat : public XMLBaseFormat
00208 {
00209 protected:
00210 OBMol* _pmol;
00211
00212 public:
00213 ~XMLMoleculeFormat(){}
00214 virtual bool ReadChemObject(OBConversion* pConv)

xml.h 1889
Open Babel: API Documentation
00215 {
00216 return OBMoleculeFormat::ReadChemObjectImpl(pConv, this);
00217 };
00218
00219 virtual bool WriteChemObject(OBConversion* pConv)
00220 {
00221 return OBMoleculeFormat::WriteChemObjectImpl(pConv, this);
00222 };
00223
00224 virtual bool ReadMolecule(OBBase* pOb, OBConversion* pConv)
00225 {
00226 _pmol = dynamic_cast<OBMol*>(pOb);
00227 if(!_pmol)
00228 return false;
00229
00230 _pxmlConv = XMLConversion::GetDerived(pConv,true);
00231 if(!_pxmlConv)
00232 return false;
00233 _embedlevel = -1;
00234 return _pxmlConv->ReadXML(this,pOb);
00235 };
00236
00237 const std::type_info& GetType()
00238 {
00239 return typeid(OBMol*);
00240 };
00241
00242 };
00243
00244
00245 }//namespace
00246

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

xml.h 1890
xml.h File Reference
Declaration of XMLConversion, declaration and definition of XMLBaseFormat and XMLMoleculeFormat.
More...

#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <openbabel/obmolecformat.h>
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include <typeinfo>

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class XMLConversion
A subclass for conversion of XML formats. More...
class XMLBaseFormat
Abstract class containing common functionality for XML formats. More...
class XMLMoleculeFormat
Abstract class for XML formats which represent molecules. More...

Detailed Description
Declaration of XMLConversion, declaration and definition of XMLBaseFormat and XMLMoleculeFormat.

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.

xml.h File Reference 1891

You might also like