Skip to content

Commit

Permalink
Revert "#4508 - Bugfix (Phosphate.ts): Correct isPartOfRna"
Browse files Browse the repository at this point in the history
This reverts commit 5f06a59.
  • Loading branch information
DmitriiP-EPAM committed May 8, 2024
1 parent d2e1a6a commit d6ee3c4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/ketcher-core/src/domain/entities/Phosphate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,12 @@ export class Phosphate extends BaseMonomer {
previousMonomer?.attachmentPointsToBonds.R3?.getAnotherMonomer(
previousMonomer,
) instanceof RNABase;
if (isPreviousMonomerSugar && isSugarConnectedToBase) {
return true;
}
const nextMonomer =
this.attachmentPointsToBonds.R2?.getAnotherMonomer(this);
const isNextMonomerRna = !!nextMonomer?.isPartOfRna;

// The checking below used here because we need to interpret last phosphate of RNA chain
// isNextMonomerRna used here because we need to interpret last phosphate of rna chain
// as not a part of nucleoTide but as phosphate connected to nucleoSide
return !!nextMonomer?.isPartOfRna;
return isPreviousMonomerSugar && isSugarConnectedToBase && isNextMonomerRna;
}
}

0 comments on commit d6ee3c4

Please sign in to comment.