OpenBabel Namespace Reference

Global namespace for all Open Babel code. More...

Namespaces

namespace  OBGenericDataType
namespace  OBAminoAcidProperty
namespace  OBResidueAtomProperty
namespace  OBResidueIndex
namespace  OBResidueProperty

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  OBChargeModel
class  OBConformerFilter
 Interface used by OBConformerSearch for filtering conformers. More...
class  OBConformerFilters
 Class for combining OBConformerFilter objects. More...
class  OBStericConformerFilter
 A steric conformer filter class. More...
class  OBConformerScore
 Interface used by OBConformerSearch for scoring conformers. More...
class  OBRMSDConformerScore
 A RMSD conformer scoring class. More...
class  OBEnergyConformerScore
class  OBConformerSearch
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...
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, 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  OBDOSData
 Used to hold density of states information. More...
class  OBOrbitalEnergyData
 Used to hold information about orbital energies. More...
class  OBElectronicTransitionData
 Used to hold information about electronic transitions. 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  OBGraphSym
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  InChIFormat
class  InChICompareFormat
class  OBInternalCoord
 Used to transform from z-matrix to cartesian coordinates. More...
class  OBIsomorphismMapper
class  OBRateData
 Holds rate constant data for OBReaction. More...
class  OBNasaThermoData
 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  GasteigerState
 Helper class for OBGastChrg which stores the Gasteiger states of a given atom. More...
class  OBGastChrg
 Assigns Gasteiger partial charges. 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  OBMolBondBFSIter
 Iterate over all bonds 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
 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...
class  OBPointGroup
 Brute-force point group symmetry perception. More...
class  OBQueryAtom
class  OBQueryBond
class  OBQuery
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  OBSpectrophore
 Class to compute Spectrophores™. More...
class  OBText
 An object containing just text. More...
struct  DeleteObject
 Functor for delting containers of pointers. Scott Meyers, Effective STL, Item 7. 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  OBAlign
 Perform a least-squares alignment of two molecules or two vectors of vector3 objects. More...
class  matrix3x3
 Represents a real 3x3 matrix. More...
class  SpaceGroup
 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...
struct  OBStereo
 Placeholder for enums & Ref/Refs related functions. More...
struct  StereogenicUnit
class  OBStereoBase
 Base class for all stereochemistry classes. More...
class  OBStereoFacade
 Facade to simplify retrieval of OBStereoBase derived objects. More...
class  OBTetraNonPlanarStereo
 Base class for handling and storing non-planar stereochemistry with 4 reference atom ids. More...
class  OBTetraPlanarStereo
 Base class for handling and storing planar stereochemistry with 4 reference atoms. More...

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 std::vector< int > RotorKey
typedef std::vector< RotorKeyRotorKeys
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
typedef struct
OpenBabel::adjustedlist 
adjustedlist
typedef adjustedlist neigbourlist [NATOMSMAX]

Enumerations

enum  DataOrigin {
  any, fileformatInput, userInput, perceived,
  external, local
}
enum  atomreftype { output, input, calcvolume }
enum  score_t { Undefined = -1, PLP, ChemScore }
enum  obMessageLevel {
  obError, obWarning, obInfo, obAuditMsg,
  obDebug
}
enum  errorQualifier { always, onceOnly }
enum  { SPACE_GROUP_ID, SPACE_GROUP_HALL, SPACE_GROUP_HM, SPACE_GROUP_TRANSFORM }

Functions

std::string OBReleaseVersion ()
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)
string GetInChI (istream &is)
OBIsomorphismMapper::Mappings FindAutomorphisms (OBMol *mol, const OBBitVec &mask=OBBitVec())
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)
OBMCDL int hydrogenValency (int na)
OBMCDL int maxValency (int na)
OBMCDL int alternate (OBMol *pmol, const int nH[], int bondOrders[])
OBMCDL int alternate (const std::vector< int > aPosition, const std::vector< int > aCharge, const std::vector< int > aRad, const std::vector< int > nHydr, const std::vector< int > iA1, const std::vector< int > iA2, std::vector< int > &bondOrders, int nAtoms, int nBonds)
OBMCDL void generateDiagram (OBMol *pmol)
OBMCDL void generateDiagram (const std::vector< int > iA1, const std::vector< int > iA2, std::vector< double > &rx, std::vector< double > &ry, int nAtoms, int nBonds)
OBMCDL void generateDiagram (OBMol *pmol, std::ostream &ofs)
bool fragmentSearch (OBMol *query, OBMol *structure)
bool fragmentSearch (const std::vector< int > aPositionQuery, const std::vector< int > iA1Query, const std::vector< int > iA2Query, const std::vector< int > bondTypesQuery, const std::vector< int > aPositionStructure, const std::vector< int > iA1Structure, const std::vector< int > iA2Structure, const std::vector< int > bondTypesStructure, int nAtomsQuery, int nBondsQuery, int nAtomsStructure, int nBondsStructure)
OBMCDL void equivalenceList (OBMol *pmol, std::vector< int > &eqList)
void equivalenceList (const std::vector< int > aPosition, const std::vector< int > aCharge, const std::vector< int > aRad, const std::vector< int > iA1, const std::vector< int > iA2, const std::vector< int > bondTypes, std::vector< int > &eqList, int nAtoms, int nBonds)
OBMCDL void addFragment (OBMol *molecule, OBMol *fragment, int molAN, int fragAN, int molBN, int fragBN, bool isAddition)
OBMCDL void createStereoLists (OBMol *pmol, std::vector< int > &bondStereoList, std::vector< int > &atomStereoList, std::vector< int > &eqList)
OBMCDL std::string getAtomMCDL (OBMol *pmol, int ntatoms, const std::vector< int > ix, const std::vector< int > aNumber, const std::vector< int > atomStereoList, const std::vector< int > eqList)
OBMCDL std::string getBondMCDL (OBMol *pmol, int nbStore, int ntatoms, const std::vector< int > ix, const std::vector< int > aNumber, int bonds[MAXBONDS][4], const std::vector< int > bondStereoList, const std::vector< int > eqList)
OBMCDL void implementAtomStereo (std::vector< int > &iA1, std::vector< int > &iA2, std::vector< int > &stereoBonds, const std::vector< double >rx, const std::vector< double > ry, int acount, int bcount, std::string astereo)
OBMCDL void implementBondStereo (const std::vector< int > iA1, const std::vector< int > iA2, std::vector< double > &rx, std::vector< double > &ry, int acount, int bcount, std::string bstereo)
OBMCDL int groupRedraw (OBMol *pmol, int bondN, int atomN, bool atomNInGroup)
OBMCDL int canonizeMCDL (const std::string atomBlock, std::vector< std::string > &structureList)
OBMCDL bool parseFormula (const std::string formulaString, std::vector< int > &enumber, int &valency)
OBMCDL void prepareTest (OBMol *pmol, std::ostream &ofs)
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])
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 > > &)
OBQueryCompileMoleculeQuery (OBMol *mol, const OBBitVec &mask=OBBitVec())
OBQueryCompileSmilesQuery (const std::string &smiles, const OBBitVec &mask=OBBitVec())
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)
template<typename T >
std::string toString (T val)
OBERROR std::istream & ignore (std::istream &ifs, const 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)
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)
vector3 GetCorrectedBondVector (OBAtom *atom1, OBAtom *atom2, int bondOrder=1)
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 ByteCodeAllocateByteCode (int type)
static void DeleteByteCode (ByteCode *node)
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)
vector3 transformedFractionalCoordinate (vector3 originalCoordinate)
void IdsToSymClasses (OBMol *mol, OBCisTransStereo::Config &config, const std::vector< unsigned int > &symClasses)
void IdsToSymClasses (OBMol *mol, OBTetrahedralStereo::Config &config, const std::vector< unsigned int > &symClasses)
ostream & operator<< (ostream &os, const OBFloatGrid &fg)
istream & operator>> (istream &is, OBFloatGrid &fg)
OBQueryCompileAutomorphismQuery (OBMol *mol, const OBBitVec &mask)
int expand_cycle (OBMol *mol, OBAtom *atom, OBBitVec &avisit, OBBitVec &cvisit, int rootIdx, int prevAtomIdx, int depth)
string intToStr (int k)
double xDistPoint (double x1, double y1, double x2, double y2, double x0, double y0)
bool overlapped (double x1A, double y1A, double x2A, double y2A, double x1B, double y1B, double x2B, double y2B, double delta)
bool compareAtoms (int a1, int a2, const std::vector< std::vector< int > * > aeqList)
bool incrementValues (std::vector< int > &currentValues, const std::vector< int > maxValues)
void deleteIntElement (std::vector< int > *source, int index)
static int findAlternateSinglets (const std::vector< int >iA1, const std::vector< int >iA2, const std::vector< int > nH, const std::vector< int > hydrogenValency, std::vector< int > &bondOrder, int nAtoms, int nBonds)
static void makeAssignment (const std::vector< int > iA1, const std::vector< int > iA2, const std::vector< int > nH, const std::vector< int > hydrogenValency, const std::vector< int > bondAssignment, const std::vector< int > specialFlag, std::vector< int > &bondOrder, int nAtoms, int nBonds, int &nAss)
static bool analyzeOK (const std::vector< int > iA1, const std::vector< int > iA2, const std::vector< int > nH, const std::vector< int > hydrogenValency, const std::vector< int > maxValency, const std::vector< int > bondOrder, const std::vector< int > atomCheckFlag, int nAtoms, int nBonds, int &nGtMax, int &nNEH, int &nOddEven, bool testExceedHydrogen, bool oddEvenCheck)
static bool incrementAssignment (std::vector< int > &bondAssignment, int nAss)
static int determineBondsOrder (const std::vector< int > iA1, const std::vector< int > iA2, const std::vector< int > nH, const std::vector< int > maxValency, std::vector< int > &bondOrder, std::vector< int > &hydrogenValency, int nAtoms, int nBonds, bool oddEvenViolate)
int alternate (OBMol *pmol, const std::vector< int > nH, std::vector< int > &bondOrders)
bool ptInRect (const Rect r, const Point p)
int compareStringsNumbers (string s1, string s2)
std::string getAtomSymbol (TSimpleMolecule &sm, int atAtom, int atEx, int priority, string ndData)
std::string getAtomSymbol (TSimpleMolecule &sm, int atAtom)
int indexOf (const string instring, const string substring, int fromPos=0)
std::string removeZeroeth (std::string instring)
int analizeParity (string data)
int analizeParityBond (string data)
std::string changeParity (std::string data)
std::string changeParityBond (std::string data)
int sproduct (TSimpleMolecule &sm, int br, int i1, int i2)
bool bondEquivalent (int bn1, int bn2, const std::vector< int > eqList, TSimpleMolecule &sm)
std::string addZeroeth (std::string instring, std::string stringAdd)
void setUpDownBonds (int atomNo, int parity, TSimpleMolecule &sm, std::vector< int > &iA1, std::vector< int > &iA2, std::vector< int > &stereoBonds)
bool restoreDoubleBonds (TEditedMolecule &sm, bool putEither)
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])
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 PatternCopyPattern (Pattern *)
static AtomExprAllocAtomExpr (void)
static AtomExprCopyAtomExpr (AtomExpr *expr)
static void FreeAtomExpr (AtomExpr *expr)
static AtomExprBuildAtomLeaf (int prop, int val)
static AtomExprBuildAtomNot (AtomExpr *expr)
static AtomExprBuildAtomBin (int op, AtomExpr *lft, AtomExpr *rgt)
static AtomExprBuildAtomRecurs (Pattern *pat)
static AtomExprGenerateElement (int elem)
static AtomExprGenerateAromElem (int elem, int flag)
static int IsInvalidAtom (AtomExpr *expr)
static BondExprAllocBondExpr (void)
static BondExprCopyBondExpr (BondExpr *expr)
static bool EquivalentBondExpr (BondExpr *expr1, BondExpr *expr2)
static void FreeBondExpr (BondExpr *expr)
static BondExprBuildBondLeaf (int prop, int val)
static BondExprBuildBondNot (BondExpr *expr)
static BondExprBuildBondBin (int op, BondExpr *lft, BondExpr *rgt)
static BondExprGenerateDefaultBond (void)
static PatternAllocPattern (void)
static int CreateBond (Pattern *pat, BondExpr *expr, int src, int dst)
static PatternParseSMARTSPattern (void)
static PatternParseSMARTSPart (Pattern *, int)
static PatternSMARTSError (Pattern *pat)
static AtomExprParseSimpleAtomPrimitive (void)
static AtomExprParseComplexAtomPrimitive (void)
static AtomExprParseAtomExpr (int level)
static BondExprParseBondPrimitive (void)
static BondExprParseBondExpr (int level)
static PatternParseSMARTSError (Pattern *pat, BondExpr *expr)
static PatternSMARTSParser (Pattern *pat, ParseState *stat, int prev, int part)
static void MarkGrowBonds (Pattern *pat)
static int GetChiralFlag (AtomExpr *expr)
static PatternParseSMARTSString (char *ptr)
PatternParseSMARTSRecord (char *ptr)
static AtomExprNotAtomExpr (AtomExpr *)
static AtomExprAndAtomExpr (AtomExpr *, AtomExpr *)
static AtomExprOrAtomExpr (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 AtomExprAtomExprImplies (AtomExpr *lft, AtomExpr *rgt)
static AtomExprAndAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
static AtomExprConstrainRecursion (AtomExpr *recur, AtomExpr *expr)
static AtomExprOrAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt)
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 &)
std::vector< unsigned int > atomRingToBondRing (OBMol *mol, const std::vector< int > &atoms)
void visitRing (OBMol *mol, OBRing *ring, std::vector< OBRing * > &rlist, std::vector< OBRing * > &rignored)
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)
std::string RemoveWhiteSpaceUnderscore (const string &in)
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)
void CleanAtomType (char *)
High level functions

void PerceiveStereo (OBMol *mol, bool force=false)
void StereoFrom2D (OBMol *mol, std::map< OBBond *, enum OBStereo::BondDirection > *updown=NULL, bool force=false)
void StereoFrom3D (OBMol *mol, bool force=false)
void StereoFrom0D (OBMol *mol)
Low level functions

std::vector
< OBTetrahedralStereo * > 
TetrahedralFrom3D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, bool addToMol=true)
std::vector
< OBTetrahedralStereo * > 
TetrahedralFrom2D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, bool addToMol=true)
std::vector
< OBTetrahedralStereo * > 
TetrahedralFrom0D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, bool addToMol=true)
std::vector< OBCisTransStereo * > CisTransFrom3D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, bool addToMol=true)
std::vector< OBCisTransStereo * > CisTransFrom2D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, const std::map< OBBond *, enum OBStereo::BondDirection > *updown=NULL, bool addToMol=true)
void TetStereoTo0D (OBMol &mol, std::map< OBBond *, enum OBStereo::BondDirection > &updown, std::map< OBBond *, OBStereo::Ref > &from)
std::set< OBBond * > GetUnspecifiedCisTrans (OBMol &mol)
void StereoRefToImplicit (OBMol &mol, OBStereo::Ref atomId)
std::vector< OBCisTransStereo * > CisTransFrom0D (OBMol *mol, const std::vector< StereogenicUnit > &stereoUnits, bool addToMol=true)
Stereogenic unit identification

std::vector< StereogenicUnitFindStereogenicUnits (OBMol *mol, const std::vector< unsigned int > &symClasses)

Variables

const unsigned int AliasDataType = 0x7883
const unsigned RateData = 55555
const unsigned ThermoData = 55556
OBERROR OBLocale obLocale
static const int MAXBONDS = 300
static const int MAXFRAGS = 200
static const int MAXCHARS = 1000
static const int MAX_DEPTH = 10
static const int NELEMMAX = 120
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
const int hVal [NELEMMCDL]
const int maxVal [NELEMMCDL]
const int chargeVal [NELEMMCDL]
const string aSymb [NELEMMCDL]
const int exactAtom [NEXACTATOMS] = {6,14,5,50,82,8,16,34,52,7,15,33,51,9,17,35,53,32,13,26,80}
const int alkaly [NALKALYATOMS] = {3,11,19,37,55}
const int alkalyEarth [NALKALYEARTHATOMS] = {4,12,20,38,56}
const int trivalent [NTRIVALENTATOMS] = {21,31,39,49,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,81,89,90,91,92,93,94,95,96,97,98,99}
const int titan [NTITANATOMS] = {22,40,72}
const int vanadium [NVANADIUMATOMS] = {23,41,73}
const int cromium [NCHROMIUMATOMS] = {24,42,74}
const int manganeze [NMANGANESEATOMS] = {25,43,75}
const int likeFe [NLIKEFEATOMS] = {27,28}
const int platinum [NPLATINUMATOMS] = {44,45,46,76,77,78}
const int copper [NCOPPERATOMS] = {29,47,79}
const int zink [NZINKATOMS] = {30,48}
const int possibleAromatic [NAROMMAX] = {7,8,15,16,33,34,51,52,HETERO_ATOM}
const int metals [NMETALS]
const int lightMetals [NLIGHT_METALS]
const int heavyMetals [NHEAVY_METALS]
const int halogens [NHALOGENS] = {9,17,35,53,85}
const int hetero [NHETERO] = {7,8,14,15,16,33,34,51,52,84}
const string strData [NDATABASE_MOLECULES]
const int bondValence [NBONDTYPES] = {1,2,3,1,1,0,0,0,1,1,1}
const string fsastart = "{SA:"
const string fsbstart = "{SB:"
bool SwabInt = (STPTR[0]!=0)
static double Roots [4]
static char * MainPtr
static char * LexPtr
static char Buffer [BUFF_SIZE]
static char Descr [BUFF_SIZE]
std::vector< std::pair
< Pattern *, std::vector< bool > > > 
RSCACHE
std::vector< Pattern * > Fragments
static int N_parsed_bonds
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 std::vector<int> RotorKey
typedef std::vector<RotorKey> RotorKeys

Store arbitrary key/value integer data like OBPairData.

Store arbitrary key/value floating point data like OBPairData.

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.

typedef adjustedlist neigbourlist[NATOMSMAX]

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.

local 

Not for routine external use (e.g. in sdf or cml properties).

Enumerator:
output 
input 
calcvolume 
enum score_t
Enumerator:
Undefined 
PLP 
ChemScore 

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

Enumerator:
always 
onceOnly 
anonymous enum
Enumerator:
SPACE_GROUP_ID 
SPACE_GROUP_HALL 
SPACE_GROUP_HM 
SPACE_GROUP_TRANSFORM 

Function Documentation

std::string OBReleaseVersion (  ) 
Returns:
the version of the Open Babel library for feature-detection (e.g. "2.3.1")
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,
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 = true 
)
Deprecated:
Use new Stereochemistry classes.

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,
const vector3 &  b,
const vector3 &  c,
const vector3 &  d 
)

Calculate a signed volume given a set of 4 coordinates.

Deprecated:
Use new Stereochemistry classes.

Referenced by CalcSignedVolume().

void GetChirality ( OBMol &  mol,
std::vector< int > &  chirality 
)
Deprecated:
Use new Stereochemistry classes.
int GetParity4Ref ( std::vector< unsigned int >  pref  ) 
Deprecated:
Use new Stereochemistry classes.

Referenced by CorrectChirality().

bool CorrectChirality ( OBMol &  mol,
OBAtom *  atm,
atomreftype  i = input,
atomreftype  o = output 
)
Deprecated:
Use new Stereochemistry classes.
static bool OpenBabel::DoComparison ( char  ch1,
char  ch2,
T &  val,
T &  filterval 
) [static]
string OpenBabel::GetInChI ( istream &  is  ) 
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 
)

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

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 
)
int hydrogenValency ( int  na  ) 

Referenced by alternate().

int maxValency ( int  na  ) 

Referenced by alternate().

OBMCDL int OpenBabel::alternate ( OBMol *  pmol,
const int  nH[],
int  bondOrders[] 
)
int alternate ( const std::vector< int >  aPosition,
const std::vector< int >  aCharge,
const std::vector< int >  aRad,
const std::vector< int >  nHydr,
const std::vector< int >  iA1,
const std::vector< int >  iA2,
std::vector< int > &  bondOrders,
int  nAtoms,
int  nBonds 
)
void generateDiagram ( OBMol *  pmol  ) 
Since:
version 2.3
void generateDiagram ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
std::vector< double > &  rx,
std::vector< double > &  ry,
int  nAtoms,
int  nBonds 
)
void generateDiagram ( OBMol *  pmol,
std::ostream &  ofs 
)
bool fragmentSearch ( OBMol *  query,
OBMol *  structure 
)
bool fragmentSearch ( const std::vector< int >  aPositionQuery,
const std::vector< int >  iA1Query,
const std::vector< int >  iA2Query,
const std::vector< int >  bondTypesQuery,
const std::vector< int >  aPositionStructure,
const std::vector< int >  iA1Structure,
const std::vector< int >  iA2Structure,
const std::vector< int >  bondTypesStructure,
int  nAtomsQuery,
int  nBondsQuery,
int  nAtomsStructure,
int  nBondsStructure 
)
void equivalenceList ( OBMol *  pmol,
std::vector< int > &  eqList 
)

Equivalence list generation.

void equivalenceList ( const std::vector< int >  aPosition,
const std::vector< int >  aCharge,
const std::vector< int >  aRad,
const std::vector< int >  iA1,
const std::vector< int >  iA2,
const std::vector< int >  bondTypes,
std::vector< int > &  eqList,
int  nAtoms,
int  nBonds 
)
void addFragment ( OBMol *  molecule,
OBMol *  fragment,
int  molAN,
int  fragAN,
int  molBN,
int  fragBN,
bool  isAddition 
)
void createStereoLists ( OBMol *  pmol,
std::vector< int > &  bondStereoList,
std::vector< int > &  atomStereoList,
std::vector< int > &  eqList 
)
std::string getAtomMCDL ( OBMol *  pmol,
int  ntatoms,
const std::vector< int >  ix,
const std::vector< int >  aNumber,
const std::vector< int >  atomStereoList,
const std::vector< int >  eqList 
)
std::string getBondMCDL ( OBMol *  pmol,
int  nbStore,
int  ntatoms,
const std::vector< int >  ix,
const std::vector< int >  aNumber,
int  bonds[MAXBONDS][4],
const std::vector< int >  bondStereoList,
const std::vector< int >  eqList 
)
void implementAtomStereo ( std::vector< int > &  iA1,
std::vector< int > &  iA2,
std::vector< int > &  stereoBonds,
const std::vector< double >  rx,
const std::vector< double >  ry,
int  acount,
int  bcount,
std::string  astereo 
)
void implementBondStereo ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
std::vector< double > &  rx,
std::vector< double > &  ry,
int  acount,
int  bcount,
std::string  bstereo 
)
int OBMCDL groupRedraw ( OBMol *  pmol,
int  bondN,
int  atomN,
bool  atomNInGroup 
)
int canonizeMCDL ( const std::string  atomBlock,
std::vector< std::string > &  structureList 
)
bool parseFormula ( const std::string  formulaString,
std::vector< int > &  enumber,
int &  valency 
)
void prepareTest ( OBMol *  pmol,
std::ostream &  ofs 
)
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
void CartesianToInternal ( std::vector< 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().

void InternalToCartesian ( std::vector< 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

string NewExtension ( std::string &  src,
char *  ext 
)

Utility function: replace the last extension in string &src with new extension char *ext.

void get_rmat ( double *  rvec,
double *  r,
double *  f,
int  size 
)
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 *  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.

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.

void CleanAtomType ( char *  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.
bool IsNear ( const double &  a,
const double &  b,
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(), OBConformerSearch::Search(), OBForceField::SteepestDescentTakeNSteps(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

bool IsNearZero ( const double &  a,
const double  epsilon = 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(), OBBond::SetLength(), OBForceField::VectorAngle(), OBForceField::VectorAngleDerivative(), OBForceField::VectorOOP(), OBForceField::VectorOOPDerivative(), OBForceField::VectorTorsion(), and OBForceField::VectorTorsionDerivative().

bool IsNan ( const double &  a  ) 

Comparison for nan (not a number).

Referenced by OBDescriptor::CompareStringWithFilter().

bool OpenBabel::IsNegligible ( const double &  a,
const double &  b,
const double  precision = 1e-11 
) [inline]
Returns:
true if a is much smaller than b. More precisely:
   return( fabs(a) <= precision * fabs(b) );

Referenced by vector3::createOrthoVector(), and matrix3x3::isDiagonal().

bool OpenBabel::IsApprox ( const double &  a,
const double &  b,
const double  precision = 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,
const double  precision = 1e-11 
) [inline]

Same as IsApprox(), but only for positive numbers. Faster.

bool CanBeSquared ( const double &  a  ) 

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 
)

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 
)
void DoubleAdd ( DoubleType *  x,
unsigned int  y 
)
unsigned int DoubleModulus ( DoubleType *  n,
unsigned int  d 
)
bool CompareRingSize ( const OBRing *  a,
const OBRing *  b 
)

Comparison function for rings, used by OBRingSearch::SortRings()

Returns:
true if a.size() > b.size()
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 patty::assign_rules(), OBDescriptor::DeleteProperties(), DLHandler::findFiles(), 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  ) 

Remove leading and trailing whitespace from a string (docs in tokenst.cpp).

Removes white space from front and back of string.

Referenced by OBMol::DoTransformations(), OBCommentData::SetData(), and OBMol::SetTitle().

std::string OpenBabel::toString ( val  ) 
std::istream & ignore ( std::istream &  ifs,
const std::string &  txt 
)

Read and discard all characters from input stream up to, and including, a string.

Read and discard all characters from input stream upto the occurence of a string

Parameters:
ifs The input file stream.
txt (which is also discarded), or the end of the stream.
Returns:
the stream.
std::string OpenDatafile ( std::ifstream &  ifs,
const std::string &  filename,
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.

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.

vector3 operator* ( const matrix3x3 &  m,
const vector3 &  v 
)

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 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(), OBUnitCell::GetAlpha(), OBAtom::GetAngle(), OBUnitCell::GetBeta(), OBUnitCell::GetGamma(), 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 "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(), and OBBond::IsDoubleBondGeometry().

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
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
OBBitVec OpenBabel::operator- ( const 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
bool OpenBabel::operator== ( const OBBitVec &  bv1,
const OBBitVec &  bv2 
)

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
vector3 OpenBabel::GetCorrectedBondVector ( OBAtom *  atom1,
OBAtom *  atom2,
int  bondOrder = 1 
)
static bool OpenBabel::CompareUnsigned ( const unsigned int &  a,
const unsigned int &  b 
) [static]
static bool OpenBabel::ComparePairFirst ( const pair< OBAtom *, unsigned int > &  a,
const pair< OBAtom *, unsigned int > &  b 
) [static]
static bool OpenBabel::ComparePairSecond ( const pair< OBAtom *, unsigned int > &  a,
const pair< OBAtom *, unsigned int > &  b 
) [static]
static bool OpenBabel::CompareBondPairSecond ( const pair< OBBond *, unsigned int > &  a,
const pair< OBBond *, unsigned int > &  b 
) [static]
static unsigned int OpenBabel::GetValence ( OBAtom *  atom,
OBBitVec &  frag_atoms 
) [static]
static unsigned int OpenBabel::GetHvyValence ( OBAtom *  atom,
OBBitVec &  frag_atoms 
) [static]

Referenced by GetGIVector().

static unsigned int OpenBabel::GetHvyBondSum ( OBAtom *  atom,
OBBitVec &  frag_atoms 
) [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().

static void OpenBabel::CreateNewClassVector ( vector< pair< OBAtom *, unsigned int > > &  vp1,
vector< pair< OBAtom *, unsigned int > > &  vp2,
OBBitVec &  frag_atoms,
int  natoms 
) [static]
static void OpenBabel::CountAndRenumberClasses ( vector< pair< OBAtom *, unsigned int > > &  vp,
unsigned int &  count 
) [static]
static int OpenBabel::ExtendInvarients ( vector< pair< OBAtom *, unsigned int > > &  symmetry_classes,
OBBitVec &  frag_atoms,
int  nfragatoms,
int  natoms 
) [static]
static int OpenBabel::CalculateSymmetry ( OBMol *  pmol,
OBBitVec &  frag_atoms,
vector< pair< OBAtom *, unsigned int > > &  symmetry_classes 
) [static]

Referenced by CanonicalLabels().

static void OpenBabel::BreakChiralTies ( OBMol *  pmol,
OBBitVec &  frag_atoms,
int  nfragatoms,
vector< pair< OBAtom *, unsigned int > > &  atom_sym_classes 
) [static]

Referenced by CanonicalLabels().

static void OpenBabel::FindConjugatedEZBonds ( OBAtom *  atom,
OBBitVec &  flip_bonds,
OBBitVec &  visited_atoms 
) [static]

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 
)
void OpenBabel::Toupper ( string &  s  ) 
void OpenBabel::Tolower ( string &  s  ) 
void OpenBabel::Reweight ( std::vector< std::vector< double > > &  rotorWeights,
std::vector< int >  rotorKey,
double  bonus 
)
vector3 OpenBabel::transformedFractionalCoordinate ( vector3  originalCoordinate  ) 
void OpenBabel::IdsToSymClasses ( OBMol *  mol,
OBCisTransStereo::Config &  config,
const std::vector< unsigned int > &  symClasses 
)
void OpenBabel::IdsToSymClasses ( OBMol *  mol,
OBTetrahedralStereo::Config &  config,
const std::vector< unsigned int > &  symClasses 
)
ostream& OpenBabel::operator<< ( std::ostream &  os,
const OBFloatGrid &  fg 
)
istream& OpenBabel::operator>> ( std::istream &  is,
OBFloatGrid &  fg 
)
OBQuery* OpenBabel::CompileAutomorphismQuery ( OBMol *  mol,
const OBBitVec &  mask 
)

Referenced by FindAutomorphisms().

int expand_cycle ( OBMol *  mol,
OBAtom *  atom,
OBBitVec &  avisit,
OBBitVec &  cvisit,
int  rootIdx,
int  prevAtomIdx = -1,
int  depth = 19 
)

Recursively find the aromatic atoms with an aromatic bond to the current atom.

Referenced by OBMol::NewPerceiveKekuleBonds().

string OpenBabel::intToStr ( int  k  ) 

Referenced by getAtomMCDL(), and getBondMCDL().

double OpenBabel::xDistPoint ( double  x1,
double  y1,
double  x2,
double  y2,
double  x0,
double  y0 
)

Referenced by overlapped().

bool OpenBabel::overlapped ( double  x1A,
double  y1A,
double  x2A,
double  y2A,
double  x1B,
double  y1B,
double  x2B,
double  y2B,
double  delta 
)
bool OpenBabel::compareAtoms ( int  a1,
int  a2,
const std::vector< std::vector< int > * >  aeqList 
)
bool OpenBabel::incrementValues ( std::vector< int > &  currentValues,
const std::vector< int >  maxValues 
)
void OpenBabel::deleteIntElement ( std::vector< int > *  source,
int  index 
)
static int OpenBabel::findAlternateSinglets ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
const std::vector< int >  nH,
const std::vector< int >  hydrogenValency,
std::vector< int > &  bondOrder,
int  nAtoms,
int  nBonds 
) [static]
static void OpenBabel::makeAssignment ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
const std::vector< int >  nH,
const std::vector< int >  hydrogenValency,
const std::vector< int >  bondAssignment,
const std::vector< int >  specialFlag,
std::vector< int > &  bondOrder,
int  nAtoms,
int  nBonds,
int &  nAss 
) [static]

Referenced by determineBondsOrder().

static bool OpenBabel::analyzeOK ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
const std::vector< int >  nH,
const std::vector< int >  hydrogenValency,
const std::vector< int >  maxValency,
const std::vector< int >  bondOrder,
const std::vector< int >  atomCheckFlag,
int  nAtoms,
int  nBonds,
int &  nGtMax,
int &  nNEH,
int &  nOddEven,
bool  testExceedHydrogen,
bool  oddEvenCheck 
) [static]

Referenced by determineBondsOrder().

static bool OpenBabel::incrementAssignment ( std::vector< int > &  bondAssignment,
int  nAss 
) [static]

Referenced by determineBondsOrder().

static int OpenBabel::determineBondsOrder ( const std::vector< int >  iA1,
const std::vector< int >  iA2,
const std::vector< int >  nH,
const std::vector< int >  maxValency,
std::vector< int > &  bondOrder,
std::vector< int > &  hydrogenValency,
int  nAtoms,
int  nBonds,
bool  oddEvenViolate 
) [static]

Referenced by alternate().

int OpenBabel::alternate ( OBMol *  pmol,
const std::vector< int >  nH,
std::vector< int > &  bondOrders 
)
bool OpenBabel::ptInRect ( const Rect  r,
const Point  p 
)
int OpenBabel::compareStringsNumbers ( string  s1,
string  s2 
)
std::string OpenBabel::getAtomSymbol ( TSimpleMolecule &  sm,
int  atAtom,
int  atEx,
int  priority,
string  ndData 
)

nepravil'no

Referenced by getAtomMCDL(), and getBondMCDL().

std::string OpenBabel::getAtomSymbol ( TSimpleMolecule &  sm,
int  atAtom 
)
int OpenBabel::indexOf ( const string  instring,
const string  substring,
int  fromPos = 0 
)
std::string OpenBabel::removeZeroeth ( std::string  instring  ) 

Referenced by getAtomMCDL(), and getBondMCDL().

int OpenBabel::analizeParity ( string  data  ) 

Referenced by getAtomMCDL().

int OpenBabel::analizeParityBond ( string  data  ) 

Referenced by getBondMCDL().

std::string OpenBabel::changeParity ( std::string  data  ) 

Referenced by getAtomMCDL().

std::string OpenBabel::changeParityBond ( std::string  data  ) 

Referenced by getBondMCDL().

int OpenBabel::sproduct ( TSimpleMolecule &  sm,
int  br,
int  i1,
int  i2 
)

Referenced by getBondMCDL(), and restoreDoubleBonds().

bool OpenBabel::bondEquivalent ( int  bn1,
int  bn2,
const std::vector< int >  eqList,
TSimpleMolecule &  sm 
)

Referenced by getBondMCDL().

std::string OpenBabel::addZeroeth ( std::string  instring,
std::string  stringAdd 
)
void OpenBabel::setUpDownBonds ( int  atomNo,
int  parity,
TSimpleMolecule &  sm,
std::vector< int > &  iA1,
std::vector< int > &  iA2,
std::vector< int > &  stereoBonds 
)

!! By unknown reason inversion of configuration took place.

Referenced by implementAtomStereo().

bool OpenBabel::restoreDoubleBonds ( TEditedMolecule &  sm,
bool  putEither 
)

Referenced by implementBondStereo().

bool OpenBabel::SortVVInt ( const vector< int > &  a,
const vector< int > &  b 
)
bool OpenBabel::SortAtomZ ( const pair< OBAtom *, double > &  a,
const pair< OBAtom *, double > &  b 
)
static bool OpenBabel::OBComparePairSecond ( const pair< OBAtom *, unsigned int > &  a,
const pair< OBAtom *, unsigned int > &  b 
) [static]
static bool OpenBabel::OBComparePairFirst ( const pair< OBAtom *, unsigned int > &  a,
const pair< OBAtom *, unsigned int > &  b 
) [static]
static void OpenBabel::ClassCount ( vector< pair< OBAtom *, unsigned int > > &  vp,
unsigned int &  count 
) [static]

counts the number of unique symmetry classes in a list

Referenced by OBMol::GetGIDVector().

static void OpenBabel::CreateNewClassVector ( vector< pair< OBAtom *, unsigned int > > &  vp1,
vector< pair< OBAtom *, unsigned int > > &  vp2 
) [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().

static bool OpenBabel::KekulePropagate ( OBAtom *  atom,
vector< int > &  visit,
vector< int > &  ival,
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 
)
void OpenBabel::CorrectBadResonanceForm ( OBMol &  mol  ) 
bool OpenBabel::WriteTitles ( ostream &  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 int  size 
)

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.

bool OpenBabel::SafeOpen ( std::ofstream &  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 
)
static int OpenBabel::get_roots_3_3 ( double  mat[3][3],
double  roots[3] 
) [static]

Referenced by get_rmat(), and superimpose().

static bool match ( OBMol &  mol,
Pattern *  pat,
std::vector< std::vector< int > > &  mlist,
bool  single = false 
) [static]
static bool EvalAtomExpr ( AtomExpr *  expr,
OBAtom *  atom 
) [static]
static bool EvalBondExpr ( BondExpr *  expr,
OBBond *  bond 
) [static]
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().

static void OpenBabel::FatalAllocationError ( const char *  ptr  )  [static]
static void FreePattern ( Pattern *  pat  )  [static]
static Pattern * CopyPattern ( Pattern *  pat  )  [static]

Referenced by CopyAtomExpr().

static AtomExpr* OpenBabel::AllocAtomExpr ( void   )  [static]
static AtomExpr* OpenBabel::CopyAtomExpr ( AtomExpr *  expr  )  [static]

Referenced by AndAtomExpr(), and CopyPattern().

static void OpenBabel::FreeAtomExpr ( AtomExpr *  expr  )  [static]
static AtomExpr* OpenBabel::BuildAtomLeaf ( int  prop,
int  val 
) [static]
static AtomExpr* OpenBabel::BuildAtomNot ( AtomExpr *  expr  )  [static]

Referenced by NotAtomExpr(), and ParseAtomExpr().

static AtomExpr* OpenBabel::BuildAtomBin ( int  op,
AtomExpr *  lft,
AtomExpr *  rgt 
) [static]
static AtomExpr* OpenBabel::BuildAtomRecurs ( Pattern *  pat  )  [static]
static AtomExpr* OpenBabel::GenerateElement ( int  elem  )  [static]
static AtomExpr* OpenBabel::GenerateAromElem ( int  elem,
int  flag 
) [static]
static int OpenBabel::IsInvalidAtom ( AtomExpr *  expr  )  [static]

Referenced by ConstrainRecursion().

static BondExpr* OpenBabel::AllocBondExpr ( void   )  [static]
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]
static BondExpr* OpenBabel::BuildBondLeaf ( int  prop,
int  val 
) [static]
static BondExpr* OpenBabel::BuildBondNot ( BondExpr *  expr  )  [static]

Referenced by ParseBondExpr().

static BondExpr* OpenBabel::BuildBondBin ( int  op,
BondExpr *  lft,
BondExpr *  rgt 
) [static]
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]
static Pattern * ParseSMARTSPart ( Pattern *  result,
int  part 
) [static]

Referenced by ParseSMARTSPattern().

static Pattern* OpenBabel::SMARTSError ( Pattern *  pat  )  [static]
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().