class OEMCMolBase : public OEMolBase
The OEMCMolBase class provides the basic multi-conformer molecule in OEChem. It is an abstract base class which defines the interface for multi-conformer molecule 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. OEMCMolBase have an interface which allow access to conformers in a modal (OEMCMolBase::GetActive) or a non-modal manner (OEMCMolBase::GetConfs).
The following methods are publicly inherited from OEMolBase:
The following methods are publicly inherited from OEBase:
OEMCMolBase &operator=(const OEMolBase &rhs) OEMCMolBase &operator=(const OEConfBase &rhs) OEMCMolBase &operator=(const OEMCMolBase &rhs)
Assignment operator of multi-conformer molecules via this abstract base class.
Clears molecule data like atoms, bonds, and conformers without clearing away the OEBase generic data.
bool DeleteConf(OEConfBase *)=0
Deletes the conformer which is passed in from the OEMCMolBase object.
OEConfBase *GetActive() const =0
Returns the currently active conformer of the OEMCMolBase object.
OEConfBase * GetConf( const OESystem::OEUnaryPredicate<OEChem::OEConfBase > &) const =0
Returns the first conformer in the molecule for which the predicate passed in returns true.
OESystem::OEIterBase<OEConfBase > *GetConfs() const =0 OESystem::OEIterBase<OEConfBase > *GetConfs( const OESystem::OEUnaryPredicate<OEChem::OEConfBase > &) const =0
Returns an iterator over the conformers in the multi-conformer molecule. The return value of this function should always be assigned to an OEIter object. The function which takes no arguments returns an iterator over all of the conformers. The function which takes a predicate returns an iterator which only contains conformers for which the predicate returns true.
unsigned int GetMaxConfIdx() const =0
Returns the maximum conformer index of the OEMCMolBase object. Similar to OEMolBase::GetMaxAtomIdx and OEMolBase::GetMaxBondIdx this method is useful for creating temporary external data structures which can hold information that can be referenced via the OEConfBase::GetIdx method.
const char *GetMCMolTitle() const =0
Return the title for the parent molecule, don’t fall back to a conformer title like OEConfBase::GetTitle.
bool IsDeleted(OEConfBase *) const =0
Returns whether the passed in conformer has already been deleted.
OEConfBase *NewConf()=0 OEConfBase *NewConf(const OEPlatform::OEHalfFloat *)=0 OEConfBase *NewConf(const float *)=0 OEConfBase *NewConf(const double *)=0 OEConfBase *NewConf(const long double *)=0 OEConfBase *NewConf(const OEMolBase *)=0 OEConfBase *NewConf(const OEConfBase *)=0 OEConfBase *NewConf(const OEConfBase *, const OETrans &)=0 OEConfBase *NewConf(const OEConfBase *, OETYPENAME std::vector<OETorsion> &t)=0
These methods generate a new conformer that is owned by the current OEMCMolBase. Each of the methods will return a pointer to the newly created conformer. The OEMCMolBase::NewConf methods act as virtual constructors of the OEConfBase objects. OEMCMolBase::NewConf constructs a conformer with its default constructor. NewConf(const OEMolBase *) and NewConf(const OEConfBase *) copy construct a new conformer with the coordinates from the object passed into the function. The objects passed in must have the same graph as the current OEMCMolBase. NewConf that takes a OEHalfFloat, float, double, or long double pointer constructs a new conformer with the coordinates passed in as coords. The array must be of length GetMaxAtomIdx() * 3, and the coordinates for each atom in the new conformer should be the dimension values in the array starting at coords[atom->GetIdx() * 3].
Passing a NULL to any of these methods will effectively do nothing and just return a NULL OEConfBase pointer.
The dimension of the conformer will be set to 0 for the NewConf default constructor. The NewConf methods that create conformers from coordinates will set the dimension of the conformer to 3. The NewConf methods that copy construct will copy the dimension from the source.
unsigned int NumConfs() const =0
Returns the number of conformers contained in the OEMCMolBase object.
bool OrderConfs(const OETYPENAME std::vector<OEConfBase *> &)=0
Reorders the conformers in the molecule to the order specified in the vector argument. If the vector contains an incomplete list, the remaining conformers will come at the end. This function call changes the order in which the conformers are returned by OEMCMolBase::GetConfs, but does not change the conformer indices.
The OEMCMolBase::PopActive method removes the top active conformer from the active stack and makes the next highest conformer in the stack active.
bool PushActive(OEConfBase *)=0
The OEMCMolBase::PushActive method makes the new conformer the active one and pushes the previous active conformer down the stack.
bool SetActive(OEConfBase *)=0
Makes the conformer passed in become the active conformer. The conformer passed in must already be a member of the OEMCMolBase object.
Cleans up unused memory and objects which may be associated with the conformers of the OEMCMolBase. Renumber the conformer indices sequentially. This function invalidates the conformer indices of all conformers in a molecule. Note that this function doesn’t guarantee that all conformer indices are sequential upon completion (some molecule implementations may treat OEMolBase::Sweep as a no-op).