Skip to content

Commit

Permalink
Merge pull request #2634 from timvdm/bugfixes
Browse files Browse the repository at this point in the history
Fix bug in distance geometry code
  • Loading branch information
ghutchis committed Oct 20, 2023
2 parents e7aa094 + e17312a commit 7d6fd4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/distgeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,10 @@ namespace OpenBabel {

float lBounds = _d->GetLowerBounds(a->GetIdx() - 1, d->GetIdx() - 1) + DIST14_TOL;
float uBounds = _d->GetUpperBounds(a->GetIdx() - 1, d->GetIdx() - 1) - DIST14_TOL;
if (ct->IsTrans(a, d)) {
if (ct->IsTrans(a->GetId(), d->GetId())) {
// lower bounds should be trans (current upper bounds)
_d->SetLowerBounds(a->GetIdx() - 1, d->GetIdx() - 1, uBounds - DIST14_TOL);
} else if (ct->IsCis(a, d)) {
} else if (ct->IsCis(a->GetId(), d->GetId())) {
// upper bounds should be cis (current lower bounds)
_d->SetUpperBounds(a->GetIdx() - 1, d->GetIdx() - 1, lBounds + DIST14_TOL);
}
Expand Down

0 comments on commit 7d6fd4c

Please sign in to comment.