Esempio n. 1
0
  double OBBond::GetEquibLength() const
  {
    const OBAtom *begin, *end;

    begin = GetBeginAtom();
    end = GetEndAtom();
    double length = CorrectedBondRad(begin->GetAtomicNum(), begin->GetHyb())
                  + CorrectedBondRad(end->GetAtomicNum(), end->GetHyb());

    if (IsAromatic())
      return length * 0.93;
    
    switch (_order) {
    case 3:
      return length * 0.87;
    case 2:
      return length * 0.91;
    }
    return length;
  }
Esempio n. 2
0
  double OBBond::GetEquibLength() const
  {
    double length;
    const OBAtom *begin, *end;
    // CorrectedBondRad will always return a # now
    //  if (!CorrectedBondRad(GetBeginAtom(),rad1)) return(0.0);
    //  if (!CorrectedBondRad(GetEndAtom(),rad2))   return(0.0);

    begin = GetBeginAtom();
    end = GetEndAtom();
    length = etab.CorrectedBondRad(begin->GetAtomicNum(), begin->GetHyb())
      + etab.CorrectedBondRad(end->GetAtomicNum(), end->GetHyb());

    if (IsAromatic())
      length *= 0.93;
    else if (GetBO() == 2)
      length *= 0.91;
    else if (GetBO() == 3)
      length *= 0.87;
    return(length);
  }