Skip to content

Commit

Permalink
#4608 - Bugfix (PolymerBond): Correct isSideChainConnection getter …
Browse files Browse the repository at this point in the history
…(the third requirement) (amend)
  • Loading branch information
DmitriiP-EPAM committed Jun 29, 2024
1 parent 9641c56 commit dfa6641
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ketcher-core/src/domain/entities/PolymerBond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ export class PolymerBond extends DrawingEntity {

public get isBackboneChainConnection(): boolean {
// Variants:
// • Not RNA base [R2][R1] Not RNA base
// • Not RNA base [R1][R2] Not RNA base
// • Sugar [R3][R1] RNA base
// • [R1] RNA base — Sugar [R3]
// • Not RNA base (R2)(R1) Not RNA base
// • Not RNA base (R1)(R2) Not RNA base
// • Sugar (R3)(R1) RNA base
// • RNA base (R1) — (R3) Sugar
if (!this.secondMonomer) {
return true;
}
Expand All @@ -103,7 +103,7 @@ export class PolymerBond extends DrawingEntity {
(firstMonomerAttachmentPoint === AttachmentPointName.R1 &&
secondMonomerAttachmentPoint === AttachmentPointName.R2);
const thereAreNotRNABase =
!(firstMonomer instanceof RNABase) || !(secondMonomer instanceof RNABase);
!(firstMonomer instanceof RNABase) && !(secondMonomer instanceof RNABase);
if (thereAreR1AndR2 && thereAreNotRNABase) {
return true;
}
Expand Down

0 comments on commit dfa6641

Please sign in to comment.