Skip to content

Commit

Permalink
#3893 - Remove explicit hydrogens feature changes layout of simple mo…
Browse files Browse the repository at this point in the history
…lecules (#4133)

- removed rescale if there is no bonds
- fixed screenshots

---------

Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
  • Loading branch information
rrodionov91 and rrodionov91 authored Feb 23, 2024
1 parent 5395b1d commit e571d2d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"mode": "open-angle",
"pos": [
{
"x": 14.818421052631582,
"x": 15.075000000000003,
"y": -8,
"z": 0
},
{
"x": 15.450000000000003,
"x": 17.075000000000003,
"y": -8,
"z": 0
}
Expand All @@ -31,7 +31,7 @@
{
"type": "plus",
"location": [
14.028947368421054,
12.575000000000003,
-8,
0
],
Expand All @@ -47,7 +47,7 @@
{
"label": "H",
"location": [
13.63421052631579,
11.325000000000003,
-8,
0
]
Expand All @@ -60,7 +60,7 @@
{
"label": "O",
"location": [
14.50263157894737,
14.075000000000003,
-8,
0
]
Expand All @@ -73,7 +73,7 @@
{
"label": "H",
"location": [
15.765789473684212,
18.075000000000003,
-8,
0
]
Expand Down
7 changes: 2 additions & 5 deletions packages/ketcher-core/src/domain/entities/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,8 @@ export class Struct {

rescale() {
let avg = this.getAvgBondLength();
if (avg < 0 && !this.isReaction) {
// TODO [MK] this doesn't work well for reactions as the distances between
// the atoms in different components are generally larger than those between atoms of a single component
// (KETCHER-341)
avg = this.getAvgClosestAtomDistance();
if (avg <= 0) {
return;
}
if (avg < 1e-3) avg = 1;

Expand Down

0 comments on commit e571d2d

Please sign in to comment.