Loading...
Searching...
No Matches
obutil.cpp File Reference
`#include <openbabel/babelconfig.h>`
`#include <openbabel/math/matrix3x3.h>`
`#include <openbabel/mol.h>`
`#include <openbabel/atom.h>`
`#include <openbabel/obiter.h>`
`#include <openbabel/obutil.h>`
`#include <openbabel/internalcoord.h>`
`#include <cstring>`

## Namespaces

namespace | OpenBabel

## Macros

#define | ApproxZero 1E-7
#define | IsZero(x)
#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)
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 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)
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
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 &)
bool | SafeOpen (std::ifstream &fs, const char *filename)
bool | SafeOpen (std::ofstream &fs, const char *filename)
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.

## Macro Definition Documentation

## ApproxZero

#define ApproxZero 1E-7

## IsZero

#define IsZero | ( |  | x | ) |

Value:
((double)fabs(x)<ApproxZero)
ApproxZero
#define ApproxZero
Definition obutil.cpp:773

Referenced by OpenBabel::SolveCubic(), OpenBabel::SolveLinear(), and OpenBabel::SolveQuadratic().

## PI

#define PI 3.14159265358979323846226433

## OneThird

#define OneThird (1.0/3.0)

Referenced by OpenBabel::CubeRoot(), and OpenBabel::SolveCubic().

## FourThirdsPI

#define FourThirdsPI (4.0*PI/3.0)

Referenced by OpenBabel::SolveCubic().

## TwoThirdsPI

#define TwoThirdsPI (2.0*PI/3.0)

Referenced by OpenBabel::SolveCubic().

## MAX_SWEEPS

#define MAX_SWEEPS 50

Referenced by matrix3x3::jacobi(), and OpenBabel::ob_make_rmat().