OEConfBase¶
class OEConfBase : public OEMolBase
OEConfBase is the generic conformer base class.
It is an abstract base class which defines the interface for
conformer implementations. Coordinates can be stored in
OEHalfFloat (16-bit), float
(32-bit),
double
(64-bit), or long double
(>= 64-bit). The precision
is determined by the constructor argument given to
OEMol, taken from the
OEMCMolType
namespace. The default is 32-bit
float
.
The following methods are publicly inherited from OEMolBase:
The following methods are publicly inherited from OEMolBase only in Java:
The following methods are publicly inherited from OEBase:
operator=¶
OEConfBase &operator=(const OEMolBase &rhs)
OEConfBase &operator=(const OEConfBase &rhs)
Conformer assignment either from another conformer or OEMolBase.
AddAtom¶
void AddAtom(OEAtomBase *atom)=0
void AddAtom(const OEAtomBase *rhs, OEAtomBase *atom)=0
OEConfBase.AddAtom
is a helper method
that the OEMCMolBase can call as an
adjunct to OEMolBase.NewAtom
on the
molecule which contains the conformers.
Warning
This should not be called by a primary user.
AddBond¶
void AddBond(OEBondBase *bond)=0
OEConfBase.AddBond
is a helper method
that the OEMCMolBase can call as an
adjunct to OEMolBase.NewBond
on the
molecule which contains the conformers.
Warning
This should not be called by a primary user.
Delete¶
void Delete()=0
The OEConfBase.Delete
method is equivalent to call
OEMCMolBase.DeleteConf
from the parent molecule.
It removes the current conformer from the OEMCMolBase
object containing it.
These functions do not invalidate current OEIter objects,
and all calls to OEMCMolBase.GetConfs
called after
the call to OEConfBase.Delete
will not contain the
deleted conformer.
GetCoordsPtr¶
unsigned int GetCoordsPtr(const void *&ptr) const = 0;
unsigned int GetCoordsPtr(void *&ptr) = 0;
Use with care, this provides direct access to the coordinates
pointer of this conformer. Returns a constant from the
OECoordsType
namespace specifying the type
of data ptr
will point
to. OECoordsType.Undefined
is returned if
the underlying implementation does not allow direct memory
access. If access is allowed, a pointer to the memory storing
the coordinates is returned as ptr
. That pointer is
considered owned by this class, and may be invalidated by other
non-const methods on the OEConfBase or
OEMCMolBase.
Warning
Users should avoid using this method directly. Use OEConstCoords or OEMutableCoords instead.
ClearCoords¶
bool ClearCoords() const =0
Clears the coordinates, clears perception flags and sets the coordinate
dimension to 0
See also
GetCoords¶
bool GetCoords(OEPlatform::OEHalfFloat *) const =0
bool GetCoords(float *) const =0
bool GetCoords(double *) const =0
bool GetCoords(long double *) const =0
Fills the array passed into the function with a copy of the coordinates of
the conformer.
The array passed in should be at least of length
OEConfBase.GetMaxAtomIdx
* 3
.
The coordinates of each atom in the conformer will begin at
coords[atom->GetIdx()*3]
in the array.
Changes made to the array after this function call will have no effect on
the conformer.
bool GetCoords(const OEAtomBase *, OEPlatform::OEHalfFloat *coords) const =0
bool GetCoords(const OEAtomBase *, float *coords) const =0
bool GetCoords(const OEAtomBase *, double *coords) const =0
bool GetCoords(const OEAtomBase *, long double *coords) const =0
Fills the coords
array with the coordinates of the
OEAtomBase object.
The coords
array should be at least of length 3
.
Changes made to the coord
array after this function call will
have no effect on the conformer.
GetIdx¶
unsigned int GetIdx() const =0
Returns the index of the conformer.
This value is assigned by OEChem when a conformer is created.
The conformer index is unique for the conformation of a given molecule,
and is stable (not reused) for the lifetime of that OEMCMolBase.
These values may not be assigned sequentially, and may contain gaps.
Conformer indices are guaranteed to be less than
OEMCMolBase.GetMaxConfIdx
.
Conformer indices are typically only used for efficiently storing
data in arrays externally to the OEMCMolBase.
The arrays can be conveniently indexed via OEConfBase.GetIdx
.
For iterating across the conformers of a molecule, use OEMCMolBase.GetConfs
and for keeping track of a particular conformer use the conformer pointer OEConfBase*
.
GetMCMol¶
const OEMCMolBase &GetMCMol() const =0
OEMCMolBase &GetMCMol() =0
Returns the associated multi-conformer molecule that is serving as the container for the OEConfBase.
GetTitle¶
const char *GetTitle() const =0
OEConfBase objects can have their own title.
However, if they do not, they will report the title of their parent
OEMCMolBase when the OEConfBase.GetTitle
method is called.
See also
GetTorsion¶
double GetTorsion(OETorsion &) const =0
double GetTorsion(const OEAtomBase *a, const OEAtomBase *b, const OEAtomBase *c,
const OEAtomBase *d) const =0
Returns the torsion value in the conformer. The torsion can be defined by either an OETorsion object, or by four OEAtomBase objects.
See also
GetTransform¶
const OETrans &GetTransform() const =0
Returns an OETrans, which is a container of all the transformations which have been applied to the OEConfBase. This function is particularly useful when the internal representation of coordinates may not be Cartesian.
IsDeleted¶
bool IsDeleted() const =0
OEConfBase.IsDeleted
is a helper function which
assists other classes in maintaining functionality after
an OEConfBase has been deleted.
See also
OEMolBase.IsDeleted
methods inherited from the OEMolBase class. That method has the purpose of identifying deleted atoms and bonds.
RemoveAtom¶
bool RemoveAtom(OEAtomBase *atom)=0
OEConfBase.RemoveAtom
is a helper function which
the OEMCMolBase can call as an adjunct to
OEMolBase.DeleteAtom
on the molecule
which contains the conformers.
Warning
This should not be called by a primary user.
RemoveBond¶
bool RemoveBond(OEBondBase *bond)=0
OEConfBase.RemoveBond
is a helper function which
the OEMCMolBase can call as an adjunct to
OEMolBase.DeleteBond
on the molecule
which contains the conformers.
Warning
This should not be called by a primary user.
SetCoords¶
bool SetCoords(const OEPlatform::OEHalfFloat *coords)=0
bool SetCoords(const float *coords)=0
bool SetCoords(const double *coords)=0
bool SetCoords(const long double *coords)=0
Sets the coordinates of a conformer. The coords
parameter
is expected to be an array of size
OEConfBase.GetMaxAtomIdx
*
3
. This array should contain 3
coordinates for each
atom, and they should be located in the array passed in at
coords[atom->GetIdx() * 3 + i]
, where i ranges from 0 to
3
. An internal copy of the coordinates is stored in the
OEConfBase that is independent of the
coords
array.
bool SetCoords(const OEAtomBase *, const OEPlatform::OEHalfFloat *coords)=0
bool SetCoords(const OEAtomBase *, const float *coords)=0
bool SetCoords(const OEAtomBase *, const double *coords)=0
bool SetCoords(const OEAtomBase *, const long double *coords)=0
Sets to coordinates of a single atom in the OEConfBase.
The array passed in should be of length 3
and should contain the
new coordinates of the atom.
An internal copy of the coordinates is stored in the OEConfBase
which is independent of the coords
array.
SetTorsion¶
void SetTorsion(OETorsion &)=0
void SetTorsion(OEAtomBase *a, OEAtomBase *b, OEAtomBase *c, OEAtomBase *d,
double radians)=0
Sets torsion value in the conformer. The torsion can be defined by either an OETorsion object, or by four OEAtomBase objects
See also
Transform¶
void Transform(const OETrans &)=0
void Transform(const OETransBase *)=0
Applies the geometric transformation specified in the OETransBase object or the series of geometric transformations specified in the OETrans container to the OEConfBase. These functions permanently change the coordinates of the OEConfBase.