OEConfTestBase¶
class OEConfTestBase
OEConfTestBase is the abstract base class which defines the interface for classes used to determine whether consecutive molecules read from single-conformer file-formats are combined into multi-conformer molecules.
- The following classes derive from this class:
CombineMols¶
bool CombineMols(OEMCMolBase &m1, OEMolBase &m2)=0
Adds m2
as a new conformer in the multi-conformer m1
molecule. Returns a boolean indicating whether this combination
was successful. This method should only be called if a previous
call to OEConfTestBase::CompareMols
previously returned true
.
CompareMols¶
bool CompareMols(OEMolBase &m1, OEMolBase &m2) const =0
This is the pure virtual function used to determine if two molecules are conformers of the same multi-conformer molecule. Users inheriting from this class must define this function. Note the molecule which is the second argument is not const. This allows the second molecule to be modified as may be necessary for it to be part of a multi-conformer molecule. It can be assumed that every molecule from an input stream will be used as argument ‘m2’ in this function call at least once.
CreateCopy¶
OEConfTestBase *CreateCopy() const =0
Return a pointer to a copy of the derived object. This must be implemented by all derived classes.
HasCompareMols¶
bool HasCompareMols() const
Return whether the
OEConfTestBase::CompareMols
method has a
“real” implementation and does not always return false
. This
allows OEReadMolecule
to significantly
optimize the performance of reading single conformer file
formats into OEMCMolBase objects by avoiding
copy operations. By default, this base-class method always
returns true
to be backwards compatible with sub-classes
already written before this method was
added. OEDefaultConfTest::HasCompareMols
is
the only OEChem TK implementation of this method that
returns false
, allowing significant performance optimization
for the reading into OEMol by default.