Subsections

 
8.44 OETransBase

This is the abstract base class which describes the interface for all of the high-level molecular transformation objects. It allows generic application of many manipulations (Translation, Euler Rotation, Rotation Matrix, Quaternion) to conformers. All of the default transformation currently provided carry out rigid transformations of molecule positions rather than conformational modifications. These are provided in the OEMath namespace described below.

8.44.1 CreateCopy

virtual OETransBase *CreateCopy() const = 0

This virtual constructor for generating copies of the transformations when the programmer only has access to the base class.

8.44.2 Transform

template<class C, unsigned int dim>
void Transform(OEConfBaseT<C,dim> *) const

template<class C, unsigned int dim>
void Transform(C *coords, unsigned int rows) const

These are the two primary member functions for manipulation of molecular coordinates. The first template function takes a OEMCMolBase or OEMol's conformer. This function will apply the transformation specified by the OETransBase object to the conformer which is passed to the function. Similarly, the secont function takes a pointer to a set of coordinates and an unsigned int which specifies the number of rows of coordinates to transform. This function presumes that coords is a pointer to an array of type C which is at least rows*dim long. Both functions modify the coordinates in place.

Even though the first function is a template function, it can be called without any explicit template arguments because the C and dim parameters are already specified by the conformer which is passed to the function. The second template function does not have the dim parameter specified in the function areguments, so it must be called with explicit function arguments trans.Transform<float,3>(coords,mol.GetMaxAtomIdx).

8.44.3 Protected Transformations

virtual void OETransform3D(double *, unsigned int rows) const = 0
virtual void OETransform3D(float *, unsigned int rows) const = 0
virtual void OETransform2D(float *, unsigned int rows) const = 0

These three pure-virtual functions are implemented by the derived classes in order to provide implementations to the public template functions in the base class. They provide implementations for transforming three-dimensional coordinate data stored as floats or doubles and two-dimensional data (depictions) stored as floats.