Loading...
Searching...
No Matches
mol.h File Reference
`#include <openbabel/babelconfig.h>`
`#include <math.h>`
`#include <float.h>`
`#include <vector>`
`#include <string>`
`#include <map>`
`#include <openbabel/base.h>`
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

class | OBMol
struct | max_value< T, size >
struct | max_value< T, 0 >

## Namespaces

namespace | OpenBabel
namespace | OpenBabel::detail

## Macros

#define | OB_EXTERN extern
#define | THREAD_LOCAL
#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_CLOSURE_MOL (1<<11)
#define | OB_H_ADDED_MOL (1<<12)
#define | OB_PH_CORRECTED_MOL (1<<13)
#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_PATTERN_STRUCTURE (1<<19)
#define | OB_LSSR_MOL (1<<20)
#define | OB_ATOMSPIN_MOL (1<<21)
#define | OB_REACTION_MOL (1<<22)
#define | OB_PERIODIC_MOL (1<<23)
#define | SET_OR_UNSET_FLAG(X)
#define | OB_CURRENT_CONFORMER -1
#define | BUFF_SIZE 32768
#define | EQ(a, b)
#define | EQn(a, b, n)
#define | SQUARE(x)
#define | IsUnsatType(x)

## Typedefs

typedef std::vector< OBResidue * >::iterator | OBResidueIterator

## Enumerations

enum | HydrogenType { AllHydrogen , PolarHydrogen , NonPolarHydrogen }

## 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])
double | superimpose (double *, double *, int)

## Variables

static const unsigned long | NoId = detail::max_value<unsigned long>::result

## Detailed Description

Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open Babel).

## Macro Definition Documentation

## OB_EXTERN

#define OB_EXTERN extern

## THREAD_LOCAL

#define THREAD_LOCAL

Referenced by strncasecmp().

## OB_SSSR_MOL

#define OB_SSSR_MOL (1<<1)

Smallest Set of Smallest Rings (SSSR) done. See OBRing and OBMol::FindSSSR.

Referenced by OBMol::AddNewHydrogens(), OBMol::HasSSSRPerceived(), OBMol::RenumberAtoms(), and OBMol::SetSSSRPerceived().

## OB_RINGFLAGS_MOL

#define OB_RINGFLAGS_MOL (1<<2)

Ring flags have been set: See OBRing::FindRingAtomsAndBonds.

Referenced by OBMol::FindRingAtomsAndBonds(), OBMol::HasRingAtomsAndBondsPerceived(), and OBMol::SetRingAtomsAndBondsPerceived().

## OB_AROMATIC_MOL

#define OB_AROMATIC_MOL (1<<3)

Aromatic flags have been set for atoms and bonds.

Referenced by OBMol::AddNewHydrogens(), OBMol::CopySubstructure(), OBMol::EndModify(), OBMol::HasAromaticPerceived(), OBMol::operator=(), OBMol::PerceiveBondOrders(), and OBMol::SetAromaticPerceived().

## OB_ATOMTYPES_MOL

#define OB_ATOMTYPES_MOL (1<<4)

Atom typing has been performed. See OBAtomTyper.

Referenced by OBMol::AddNewHydrogens(), OBMol::HasAtomTypesPerceived(), OBMol::PerceiveBondOrders(), and OBMol::SetAtomTypesPerceived().

## OB_CHIRALITY_MOL

#define OB_CHIRALITY_MOL (1<<5)

Chirality detection has been performed.

Referenced by OBMol::HasChiralityPerceived(), and OBMol::SetChiralityPerceived().

## OB_PCHARGE_MOL

#define OB_PCHARGE_MOL (1<<6)

Partial charges have been set or percieved.

Referenced by OBMol::AddNewHydrogens(), OBMol::HasPartialChargesPerceived(), OBMol::operator=(), and OBMol::SetPartialChargesPerceived().

## OB_HYBRID_MOL

#define OB_HYBRID_MOL (1<<8)

Atom hybridizations have been set. See OBAtomTyper.

Referenced by OBMol::AddNewHydrogens(), OBMol::HasHybridizationPerceived(), OBMol::operator=(), OBMol::PerceiveBondOrders(), and OBMol::SetHybridizationPerceived().

## OB_CLOSURE_MOL

#define OB_CLOSURE_MOL (1<<11)

Ring "closure" bonds have been set. See OBBond::IsClosure.

Referenced by OBMol::HasClosureBondsPerceived(), and OBMol::SetClosureBondsPerceived().

## OB_H_ADDED_MOL

#define OB_H_ADDED_MOL (1<<12)

Hyrdogen atoms have been added where needed. See OBMol::AddHydrogens.

Referenced by OBMol::HasHydrogensAdded(), and OBMol::SetHydrogensAdded().

## OB_PH_CORRECTED_MOL

#define OB_PH_CORRECTED_MOL (1<<13)

pH correction for hydrogen addition has been performed.

Referenced by OBMol::IsCorrectedForPH(), and OBMol::SetCorrectedForPH().

## OB_CHAINS_MOL

#define OB_CHAINS_MOL (1<<15)

Biomolecular chains and residues have been set. See OBChainsParser.

Referenced by OBMol::CopySubstructure(), OBMol::HasChainsPerceived(), OBMol::operator=(), and OBMol::SetChainsPerceived().

## OB_TCHARGE_MOL

#define OB_TCHARGE_MOL (1<<16)

Total charge on this molecule has been set. See OBMol::SetTotalCharge.

Referenced by OBMol::GetTotalCharge(), OBMol::operator=(), and OBMol::SetTotalCharge().

## OB_TSPIN_MOL

#define OB_TSPIN_MOL (1<<17)

Total spin on this molecule has been set. See OBMol::SetTotalSpinMultiplicity.

Referenced by OBMol::GetTotalSpinMultiplicity(), OBMol::operator=(), and OBMol::SetTotalSpinMultiplicity().

## OB_RINGTYPES_MOL

#define OB_RINGTYPES_MOL (1<<18)

Ring typing has been performed. See OBRingTyper.

Referenced by OBMol::HasRingTypesPerceived(), and OBMol::SetRingTypesPerceived().

## OB_PATTERN_STRUCTURE

#define OB_PATTERN_STRUCTURE (1<<19)

A pattern, not a complete molecule.

Referenced by OBMol::Clear(), OBMol::operator=(), and OBMol::SetIsPatternStructure().

## OB_LSSR_MOL

#define OB_LSSR_MOL (1<<20)

Largest Set of Smallest Rings (LSSR) done. See OBRing and OBMol::FindLSSR.

Referenced by OBMol::HasLSSRPerceived(), OBMol::RenumberAtoms(), and OBMol::SetLSSRPerceived().

## OB_ATOMSPIN_MOL

#define OB_ATOMSPIN_MOL (1<<21)

SpinMultiplicities on atoms have been set in OBMol::AssignSpinMultiplicity().

Referenced by OBMol::HasSpinMultiplicityAssigned(), and OBMol::SetSpinMultiplicityAssigned().

## OB_REACTION_MOL

#define OB_REACTION_MOL (1<<22)

Treat as reaction.

Referenced by OBMol::EndModify(), OBMol::IsReaction(), and OBMol::SetIsReaction().

## OB_PERIODIC_MOL

#define OB_PERIODIC_MOL (1<<23)

Molecule is repeating in a periodic unit cell.

Referenced by OBMol::EndModify(), OBMol::IsPeriodic(), OBMol::operator=(), and OBMol::SetPeriodicMol().

## SET_OR_UNSET_FLAG

#define SET_OR_UNSET_FLAG | ( |  | X | ) |

Value:
if (value) SetFlag(X); \
else UnsetFlag(X);

## OB_CURRENT_CONFORMER

#define OB_CURRENT_CONFORMER -1

Referenced by OBMol::Rotate(), and OBMol::Translate().

## BUFF_SIZE

#define BUFF_SIZE 32768

Referenced by patty::assign_rules(), OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::DistanceGeometry(), DLHandler::findFiles(), OBBuilder::GetFragmentCoord(), OBRotorRules::GetRotorIncrements(), OBMol::GetSpacedFormula(), OBGlobalDataBase::Init(), OBBuilder::LoadFragments(), DLHandler::openLib(), OBRotorRules::ParseLine(), OBForceField::PrintFormalCharges(), OBForceField::PrintPartialCharges(), OBForceField::PrintTypes(), OBForceField::PrintVelocities(), OBForceField::RandomRotorSearchInitialize(), OBForceField::RandomRotorSearchNextConformer(), patty::read_rules(), OBRotorList::Setup(), OBForceField::SteepestDescentInitialize(), OBForceField::SteepestDescentTakeNSteps(), OBForceField::SystematicRotorSearchInitialize(), OBForceField::SystematicRotorSearchNextConformer(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateSteepestDescent(), and OBForceField::WeightedRotorSearch().

## EQ

#define EQ | ( |  | a,
|  |  | b )

Value:
(!strcmp((a), (b)))

## EQn

#define EQn | ( |  | a,
|  |  | b,
|  |  | n )

Value:
(!strncmp((a), (b), (n)))

Referenced by OBAtomTyper::ParseLine(), OBPhModel::ParseLine(), OBRingTyper::ParseLine(), and OBRotorRules::ParseLine().

## SQUARE

#define SQUARE | ( |  | x | ) |

Value:
((x)*(x))

Referenced by OpenBabel::calc_rms(), OBRotor::CalcBondLength(), OBRotor::CalcTorsion(), OBMol::ConnectTheDots(), matrix3x3::FillOrth(), OBBond::GetLength(), OBRotor::SetRotor(), OpenBabel::SetRotorToAngle(), OBMol::SetTorsion(), OBProxGrid::Setup(), OBProxGrid::Setup(), and OBForceField::UpdatePairsSimple().

## IsUnsatType

#define IsUnsatType | ( |  | x | ) |

Value:
(EQ(x,"Car") || EQ(x,"C2") || EQ(x,"Sox") || EQ(x,"Sac") || EQ(x,"Pac") || EQ(x,"So2"))
EQ
#define EQ(a, b)
Definition mol.h:745