Loading...
Searching...
No Matches
OBProxGrid Class Reference

`#include <openbabel/grid.h>`

Inheritance diagram for OBProxGrid:
[legend]

## Public Member Functions

| OBProxGrid (int gridtype=0)
| ~OBProxGrid ()
void | Setup (OBMol &mol, OBMol &box, double cutoff, double resolution=0.5)
void | Setup (OBMol &mol, OBMol &box, double cutoff, std::vector< bool > &use, double resolution=0.5)
std::vector< int > * | GetProxVector (double, double, double)
std::vector< int > * | GetProxVector (double *)
bool | LipoGrid ()
bool | PolarGrid ()
void | SetGridType (int gridtype)
virtual void | Init (OBMol &box)
double | GetXmin () const
double | GetYmin () const
double | GetZmin () const
double | GetXmax () const
double | GetYmax () const
double | GetZmax () const
bool | PointIsInBox (double x, double y, double z)
bool | PointIsInBox (double *c)
bool | PointIsInBox (vector3 v)
virtual bool | Clear ()
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *, OBConversion *)
template<class T>
T * | CastAndClear (bool clear=true)
virtual const char * | GetTitle (bool replaceNewlines=true) const
virtual void | SetTitle (const char *)

## Static Public Member Functions

static const char * | ClassDescription ()

## Protected Attributes

int | _gridtype
int | _nxinc
int | _nyinc
int | _nzinc
int | _maxinc
double | _inc
std::vector< std::vector< int > > | cell
double | _xmin
double | _xmax
double | _ymin
double | _ymax
double | _zmin
double | _zmax

## Generic data handling methods (via OBGenericData)

std::vector< OBGenericData * > | _vdata
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)
size_t | 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 ()

## Detailed Description

A grid for determining the proximity of a given point to atoms in an OBMol.

Deprecated
  May be removed in the future, since docking is not a key feature

## Constructor & Destructor Documentation

## OBProxGrid()

OBProxGrid | ( | int | gridtype = 0 | ) |

inline

## ~OBProxGrid()

~OBProxGrid | ( |  | ) |

inline

## Member Function Documentation

## Setup() [1/2]

void Setup | ( | OBMol & | mol,
|  | OBMol & | box,
|  | double | cutoff,
|  | double | resolution = 0.5 )

## Setup() [2/2]

void Setup | ( | OBMol & | mol,
|  | OBMol & | box,
|  | double | cutoff,
|  | std::vector< bool > & | use,
|  | double | resolution = 0.5 )

## GetProxVector() [1/2]

vector< int > * GetProxVector | ( | double | x,
|  | double | y,
|  | double | z )

Referenced by GetProxVector().

## GetProxVector() [2/2]

vector< int > * GetProxVector | ( | double * | c | ) |

## LipoGrid()

bool LipoGrid | ( |  | ) |

inline

## PolarGrid()

bool PolarGrid | ( |  | ) |

inline

## SetGridType()

void SetGridType | ( | int | gridtype | ) |

inline

## Init()

void Init | ( | OBMol & | box | ) |

virtual inherited

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

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

## GetXmin()

double GetXmin | ( |  | ) | const

inline inherited

Returns
  the minimum x point of the grid

## GetYmin()

double GetYmin | ( |  | ) | const

inline inherited

Returns
  the minimum y point of the grid

## GetZmin()

double GetZmin | ( |  | ) | const

inline inherited

Returns
  the minimum z point of the grid

## GetXmax()

double GetXmax | ( |  | ) | const

inline inherited

Returns
  the maximum x point of the grid

## GetYmax()

double GetYmax | ( |  | ) | const

inline inherited

Returns
  the maximum y point of the grid

## GetZmax()

double GetZmax | ( |  | ) | const

inline inherited

Returns
  the maximum z point of the grid

## PointIsInBox() [1/3]

bool PointIsInBox | ( | double | x,
|  | double | y,
|  | double | z )

inline inherited

Returns
  whether the supplied XYZ coordinates fall within the box

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

## PointIsInBox() [2/3]

bool PointIsInBox | ( | double * | c | ) |

inline inherited

Returns
  true if the point falls within the box

## PointIsInBox() [3/3]

bool PointIsInBox | ( | vector3 | v | ) |

inline inherited

Returns
  true if the point falls within the box

## Clear()

bool Clear | ( | void |  | ) |

virtual inherited

Clear any and all data associated with this object.

This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to call OBBase::Clear() to remove inherited generic data.

Returns
  Whether the call was successful.

Since
  version 2.1.

Reimplemented in OBAtom, OBMol, OBReaction, and OBResidue.

Referenced by CastAndClear(), OBAtom::Clear(), OBMol::Clear(), and OBResidue::Clear().

## DoTransformations()

virtual OBBase * DoTransformations | ( | const std::map< std::string, std::string > * | ,
|  | OBConversion * | )

inline virtual inherited

Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription() Base type does nothing

Reimplemented in OBMol.

## ClassDescription()

const char * ClassDescription | ( |  | ) |

inline static inherited

Returns
  A list of descriptions of command-line options for DoTransformations()

## CastAndClear()

template<class T>

T * CastAndClear | ( | bool | clear = true | ) |

inline inherited

By default clears the object. Called from ReadMolecule of most format classes.

## GetTitle()

virtual const char * GetTitle | ( | bool | replaceNewlines = true | ) | const

inline virtual inherited

Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

## SetTitle()

virtual void SetTitle | ( | const char * |  | ) |

inline virtual inherited

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

## HasData() [1/3]

bool HasData | ( | const std::string & | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBDepict::DrawMolecule(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), HasData(), OBDescriptor::MatchPairData(), OBMol::NewAtom(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().

## HasData() [2/3]

bool HasData | ( | const char * | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

## HasData() [3/3]

bool HasData | ( | const unsigned int | type | ) |

inherited

Returns
  whether the generic attribute/value pair exists, for a given OBGenericDataType

## DeleteData() [1/4]

void DeleteData | ( | unsigned int | type | ) |

inherited

Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), OpenBabel::DeleteStereoOnAtom(), OBMol::EndModify(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBMol::RenumberAtoms().

## DeleteData() [2/4]

void DeleteData | ( | OBGenericData * | gd | ) |

inherited

Delete the given generic data from this object.

## DeleteData() [3/4]

void DeleteData | ( | std::vector< OBGenericData * > & | vg | ) |

inherited

Delete all of the given generic data from this object.

## DeleteData() [4/4]

bool DeleteData | ( | const std::string & | s | ) |

inherited

Deletes the generic data with the specified attribute, returning false if not found.

## SetData()

void SetData | ( | OBGenericData * | d | ) |

inline inherited

Adds a data object; does nothing if d==NULL.

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBAtom::Duplicate(), AliasData::Expand(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator+=(), OBMol::operator=(), OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

## CloneData()

void CloneData | ( | OBGenericData * | d | ) |

inherited

Adds a copy of a data object; does nothing if d == NULL

Since
  version 2.2

Referenced by OBMol::AddBond().

## DataSize()

size_t DataSize | ( |  | ) | const

inline inherited

Returns
  the number of OBGenericData items attached to this molecule.

## GetData() [1/5]

OBGenericData * GetData | ( | const unsigned int | type | ) |

inherited

Returns
  the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OBDepict::DrawMolecule(), OpenBabel::extract_thermochemistry(), OBDescriptor::FilterCompare(), OBAtom::GetAngle(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBAtom::GetDistance(), OBBond::GetLength(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OpenBabel::IsSuppressibleHydrogen(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolAngleIter::OBMolAngleIter(), OBMolTorsionIter::OBMolTorsionIter(), OBMolTorsionIter::OBMolTorsionIter(), and OBDescriptor::PredictAndSave().

## GetData() [2/5]

OBGenericData * GetData | ( | const std::string & | s | ) |

inherited

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

## GetData() [3/5]

OBGenericData * GetData | ( | const char * | s | ) |

inherited

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

## GetData() [4/5]

std::vector< OBGenericData * > & GetData | ( |  | ) |

inline inherited

Returns
  all data, suitable for iterating

Referenced by OBMol::BeginModify(), OBMol::ConnectTheDots(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBMol::GetTorsion(), OBMol::SetEnergies(), and OBMol::SetFormula().

## GetData() [5/5]

std::vector< OBGenericData * > GetData | ( | DataOrigin | source | ) |

inherited

Returns
  all data with a specific origin, suitable for iterating

## GetAllData()

std::vector< OBGenericData * > GetAllData | ( | const unsigned int | type | ) |

inherited

Returns
  the all matching data for a given type from OBGenericDataType or an empty vector if nothing matches

Since
  version 2.2

Referenced by OpenBabel::CanonicalLabels(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().

## BeginData()

OBDataIterator BeginData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the beginning of the data

Referenced by OBMol::AddAtom(), OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().

## EndData()

OBDataIterator EndData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the end of the data

Referenced by OBMol::AddAtom(), OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().

## Member Data Documentation

## _gridtype

int _gridtype

protected

Referenced by LipoGrid(), OBProxGrid(), PolarGrid(), and SetGridType().

## _nxinc

int _nxinc

protected

Referenced by Setup(), and Setup().

## _nyinc

int _nyinc

protected

Referenced by GetProxVector(), Setup(), and Setup().

## _nzinc

int _nzinc

protected

Referenced by GetProxVector(), Setup(), and Setup().

## _maxinc

int _maxinc

protected

Referenced by GetProxVector(), Setup(), and Setup().

## _inc

double _inc

protected

Referenced by GetProxVector(), Setup(), and Setup().

## cell

std::vector<std::vector<int> > cell

protected

Referenced by GetProxVector(), Setup(), and Setup().

## _xmin

double _xmin

protected inherited

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::CoordsToIndex(), OBFloatGrid::GetMin(), OBFloatGrid::GetMin(), OBProxGrid::GetProxVector(), GetXmin(), OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), Init(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _xmax

double _xmax

protected inherited

Referenced by OBFloatGrid::GetMax(), OBFloatGrid::GetMax(), OBProxGrid::GetProxVector(), GetXmax(), OBFloatGrid::Init(), Init(), OBFloatGrid::Inject(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _ymin

double _ymin

protected inherited

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::CoordsToIndex(), OBFloatGrid::GetMin(), OBFloatGrid::GetMin(), OBProxGrid::GetProxVector(), GetYmin(), OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), Init(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _ymax

double _ymax

protected inherited

Referenced by OBFloatGrid::GetMax(), OBFloatGrid::GetMax(), OBProxGrid::GetProxVector(), GetYmax(), OBFloatGrid::Init(), Init(), OBFloatGrid::Inject(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _zmin

double _zmin

protected inherited

Referenced by OBFloatGrid::CoordsToIndex(), OBFloatGrid::CoordsToIndex(), OBFloatGrid::GetMin(), OBFloatGrid::GetMin(), OBProxGrid::GetProxVector(), GetZmin(), OBFloatGrid::IndexToCoords(), OBFloatGrid::Init(), Init(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _zmax

double _zmax

protected inherited

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

Referenced by OBFloatGrid::GetMax(), OBFloatGrid::GetMax(), OBProxGrid::GetProxVector(), GetZmax(), OBFloatGrid::Init(), Init(), OBFloatGrid::Inject(), OBFloatGrid::Interpolate(), OBFloatGrid::InterpolateDerivatives(), OBFloatGrid::operator<<, OBFloatGrid::operator>>, PointIsInBox(), PointIsInBox(), PointIsInBox(), OBFloatGrid::SetLimits(), OBProxGrid::Setup(), and OBProxGrid::Setup().

## _vdata

std::vector<OBGenericData*> _vdata

protected inherited

Custom data.

Referenced by BeginData(), Clear(), CloneData(), DataSize(), DeleteData(), DeleteData(), DeleteData(), DeleteData(), OBAtom::Duplicate(), EndData(), GetAllData(), GetData(), GetData(), GetData(), GetData(), GetData(), HasData(), HasData(), OBBond::OBBond(), OBMol::OBMol(), OBMol::OBMol(), OBResidue::OBResidue(), SetData(), and ~OBBase().

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

- grid.h
- grid.cpp