#include <openbabel/mol.h>
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) |
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 |
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 () |
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) |
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 > ¤tState, std::vector< int > &initState, std::vector< int > &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 |
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")) { 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
OBBond *bond;
bond = mol.GetBond(14); //random access of a bond
FOR_ATOMS_OF_MOL(atom, mol) // iterator access (see OBMolAtomIter)
FOR_BONDS_OF_MOL(bond, mol) // iterator access (see OBMolBondIter)
OBAtom *atom = mol.GetAtom(0);
OBBond *bond = mol.GetBond(0);
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> ... #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.
OBMol | ( | ) |
Constructor.
Copy constructor, copies atoms,bonds and OBGenericData.
~OBMol | ( | ) | [virtual] |
Destructor.
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().
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().
Assignment, copies atoms,bonds and OBGenericData.
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
Referenced by OBMol::AddAtom(), and OBMol::NewAtom().
OBBond * CreateBond | ( | void | ) | [virtual] |
Create a new OBBond pointer. Does no bookkeeping
Referenced by OBMol::AddBond(), and OBMol::NewBond().
OBResidue * CreateResidue | ( | void | ) | [virtual] |
Create a new OBResidue pointer. Does no bookkeeping
Referenced by OBMol::AddResidue(), and OBMol::NewResidue().
void DestroyAtom | ( | OBAtom * | atom | ) | [virtual] |
Free an OBAtom pointer if defined. Does no bookkeeping
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
Referenced by OBMol::Clear(), OBMol::DeleteBond(), and OBMol::~OBMol().
void DestroyResidue | ( | OBResidue * | residue | ) | [virtual] |
Free an OBResidue pointer if defined. Does no bookkeeping
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
Referenced by OBMol::GetNextFragment(), OBMol::InsertAtom(), OBMol::operator+=(), and OBMol::operator=().
bool InsertAtom | ( | OBAtom & | 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
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) | |
insertpos | the position index to insert the bond (default = none) |
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
bool AddResidue | ( | OBResidue & | residue | ) |
Add the specified residue to this molecule and update connections
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()
Referenced by OBBuilder::Connect().
OBResidue * NewResidue | ( | ) |
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.
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
Referenced by OBBuilder::Build(), OBMol::ConnectTheDots(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), and OBBuilder::Swap().
bool DeleteResidue | ( | OBResidue * | residue, | |
bool | destroyResidue = true | |||
) |
Deletes a residue from this molecule and updates accordingly.
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.
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().
void EndModify | ( | bool | nukePerceivedData = true |
) | [virtual] |
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] |
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] |
Referenced by OBAtomTyper::AssignImplicitValence().
const char * GetTitle | ( | bool | replaceNewlines = true |
) | const |
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().
unsigned int NumAtoms | ( | ) | const [inline] |
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] |
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 | ( | ) |
Referenced by OBMol::DoTransformations(), OBMol::GetExactMass(), OBMol::GetMolWt(), and OBMol::GetSpacedFormula().
unsigned int NumResidues | ( | ) | const [inline] |
Referenced by OBMol::GetResidue(), and OBMol::operator=().
unsigned int NumRotors | ( | ) |
OBAtom * GetAtom | ( | int | idx | ) | const |
idx
or NULL if it does not exist. 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(), 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 |
OBBond * GetBond | ( | int | idx | ) | const |
idx
or NULL if it does not exist. 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 |
a
and b
or NULL if none exists.
bgn
and end
or NULL if none exists OBResidue * GetResidue | ( | int | idx | ) | const |
idx
, or NULL if none exists Referenced by OBMol::operator=().
std::vector< OBInternalCoord * > GetInternalCoord | ( | ) |
double GetTorsion | ( | int | a, | |
int | b, | |||
int | c, | |||
int | d | |||
) |
Referenced by OBBuilder::CorrectStereoAtoms(), OBRotorRules::GetRotorIncrements(), and OBMol::PerceiveBondOrders().
a
, b
, c
, and d
) WARNING: SetTorsion takes an angle in radians while GetTorsion returns it in degrees
a
, b
and c
(where a-> b (vertex) -> c ) string GetFormula | ( | ) |
string GetSpacedFormula | ( | int | ones = 0 , |
|
const char * | sp = " " , |
|||
bool | implicitH = true | |||
) |
Referenced by OBMol::DoTransformations(), OBMol::GetFormula(), and OBMoleculeFormat::MakeCombinedMolecule().
double GetEnergy | ( | ) | const [inline] |
double GetMolWt | ( | bool | implicitH = true |
) |
double GetExactMass | ( | bool | implicitH = true |
) |
int GetTotalCharge | ( | ) |
unsigned int GetTotalSpinMultiplicity | ( | ) |
unsigned short int GetDimension | ( | ) | const [inline] |
Referenced by OBPhModel::CorrectForPH(), OBMol::GetNextFragment(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator+=(), and OBMol::operator=().
double* GetCoordinates | ( | ) | [inline] |
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().
vector< OBRing * > & GetSSSR | ( | ) |
Implements blue-obelisk:findSmallestSetOfSmallestRings.
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().
void SetTitle | ( | const char * | title | ) |
Set the title of this molecule to title
.
Referenced by OBMol::DoTransformations(), and OBMoleculeFormat::MakeCombinedMolecule().
void SetTitle | ( | std::string & | 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().
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().
void SetChainsPerceived | ( | ) | [inline] |
Mark that chains and residues have been perceived (see OBChainsParser).
void SetChiralityPerceived | ( | ) | [inline] |
void SetPartialChargesPerceived | ( | ) | [inline] |
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] |
void SetCorrectedForPH | ( | ) | [inline] |
Referenced by OBPhModel::CorrectForPH().
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] |
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
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] |
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.
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.
void Translate | ( | const 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.
void Rotate | ( | const double | u[3][3] | ) |
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 | ( | ) |
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
Referenced by OBPhModel::CorrectForPH(), and OBMol::DoTransformations().
bool DeleteHydrogens | ( | OBAtom * | atom | ) |
Delete all hydrogens from the supplied atom
bool DeleteNonPolarHydrogens | ( | ) |
Delete all hydrogen atoms connected to a non-polar atom
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
polaronly | Whether to add hydrogens only to polar atoms (i.e., not to C atoms) | |
correctForPH | Whether to call CorrectForPH() first | |
pH | The pH to use for CorrectForPH() modification |
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 | |||
) |
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 |
) |
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 | ) |
nconf
Set the torsion defined by these atoms, rotating bonded neighbors
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().
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().
locates all atoms for which there exists a path to 'end' without going through 'bgn' children must not include 'end'
void FindLargestFragment | ( | OBBitVec & | frag | ) |
Find the largest fragment in OBMol (which may include multiple non-connected fragments)
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().
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 | ) |
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 | ( | ) |
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] |
bool HasAtomTypesPerceived | ( | ) | [inline] |
bool HasRingTypesPerceived | ( | ) | [inline] |
bool HasChiralityPerceived | ( | ) | [inline] |
bool HasPartialChargesPerceived | ( | ) | [inline] |
Have atomic Gasteiger partial charges been assigned by OBGastChrg?
bool HasHybridizationPerceived | ( | ) | [inline] |
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] |
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] |
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] |
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.
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
c
is large enough void DeleteConformer | ( | int | nconf | ) |
Delete the conformer nconf
.
double* GetConformer | ( | int | i | ) | [inline] |
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
double* BeginConformer | ( | std::vector< double * >::iterator & | i | ) | [inline] |
Set the iterator to the beginning of the conformer list
double* NextConformer | ( | std::vector< double * >::iterator & | i | ) | [inline] |
Advance the iterator to the next confomer, if possible
std::vector<double*>& GetConformers | ( | ) | [inline] |
Referenced by OBForceField::RandomRotorSearchInitialize(), OBRotamerList::SetBaseCoordinateSets(), and OBForceField::SystematicRotorSearchInitialize().
OBAtomIterator BeginAtoms | ( | ) | [inline] |
OBAtomIterator EndAtoms | ( | ) | [inline] |
OBBondIterator BeginBonds | ( | ) | [inline] |
OBBondIterator EndBonds | ( | ) | [inline] |
OBResidueIterator BeginResidues | ( | ) | [inline] |
OBResidueIterator EndResidues | ( | ) | [inline] |
OBAtom * BeginAtom | ( | OBAtomIterator & | i | ) |
Set the iterator i
to the beginning of the atom list
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
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(), 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
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
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().
OBResidue* BeginResidue | ( | OBResidueIterator & | i | ) | [inline] |
Set the iterator i
to the beginning of the resdiue list
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
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
OBInternalCoord* NextInternalCoord | ( | std::vector< OBInternalCoord * >::iterator & | i | ) | [inline] |
Advance the iterator to the next internal coordinate record
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] |
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().
bool HasData | ( | const char * | s | ) | [inherited] |
bool HasData | ( | const unsigned int | type | ) | [inherited] |
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.
bool DeleteData | ( | const std::string & | s | ) | [inherited] |
Deletes the generic data with the specified attribute, returning false if not found.
void SetData | ( | OBGenericData * | d | ) | [inline, 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
unsigned int DataSize | ( | ) | const [inline, inherited] |
OBGenericData * GetData | ( | const unsigned int | type | ) | [inherited] |
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 | ) | [inherited] |
the value given an attribute name
OBGenericData * GetData | ( | const char * | s | ) | [inherited] |
the value given an attribute name
std::vector<OBGenericData*>& GetData | ( | ) | [inline, inherited] |
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] |
std::vector< OBGenericData * > GetAllData | ( | const unsigned int | type | ) | [inherited] |
OBDataIterator BeginData | ( | ) | [inline, inherited] |
Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().
OBDataIterator EndData | ( | ) | [inline, inherited] |
Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().
int _flags [protected] |
bitfield of flags
Referenced by OBMol::AddHydrogens(), OBMol::Clear(), OBMol::EndModify(), OBMol::OBMol(), OBMol::PerceiveBondOrders(), and OBMol::StripSalts().
bool _autoPartialCharge [protected] |
bool _autoFormalCharge [protected] |
std::string _title [protected] |
Molecule title.
Referenced by OBMol::GetTitle(), OBMol::OBMol(), OBMol::operator+=(), OBMol::operator=(), and OBMol::SetTitle().
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().
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] |
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] |
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().
Residue information (if applicable).
Referenced by OBMol::AddResidue(), OBMol::Clear(), OBMol::DeleteResidue(), OBMol::GetResidue(), OBMol::NewResidue(), and OBMol::operator+=().
std::vector<OBInternalCoord*> _internals [protected] |
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().