4.58 OEGetDistance

double OEGetDistance(const OEMolBase &,
                     const OEAtomBase *a,
                     const OEAtomBase *b)
double OEGetDistance(const OEMolBase &ma,
                     const OEAtomBase *a,
                     const OEMolBase &mb,
                     const OEAtomBase *b)
double OEGetDistance(const OEConfBaseT<float,3> &conf,
                     const OEAtomBase *a,
                     const OEAtomBase *b)
double OEGetDistance(const OEConfBaseT<float,3> &ca,
                     const OEAtomBase *a,
                     const OEConfBaseT<float,3> &cb,
                     const OEAtomBase *b)

These four API points calculate the distance between two atoms. The two functions which take a single molecule (either OEMolBase& or OEConfBaseT&) assume that the two atoms are both in the single molecule. If the atoms are in different molecules, the function which takes two molecule arguments should be used. OEConfBaseT inherits from OEMolBase and strictly speaking the overload is not necessary. However, the specific OEConfBaseT implementation can be more efficient.