Skip to content

Commit

Permalink
Backmerge: #2417 - The layout is incorrect with retrosynthetic arrow (#…
Browse files Browse the repository at this point in the history
…2438)

Co-authored-by: even1024 <roman_porozhnetov@epam.com>
  • Loading branch information
AliaksandrDziarkach and even1024 authored Sep 30, 2024
1 parent ede947a commit 55473ab
Show file tree
Hide file tree
Showing 9 changed files with 339 additions and 299 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ ket_simple_arrow_retro_arrow_sum_of_products.smarts:SUCCEED
output format: CML
ket_simple_arrow_retro_arrow_sum_of_products.cml:SUCCEED
issue 2318
ket_simple_arrow_retro_arrow_sum_of_products.cml:SUCCEED
ket_retro_arrow.ket:SUCCEED
issue 2417
ket_retro_arrow.ket:SUCCEED
13 changes: 12 additions & 1 deletion api/tests/integration/tests/formats/ket_retrosynthetic_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def getCML(reaction):

print("issue 2318")
indigo.setOption("json-use-native-precision", "1")
fname = os.path.join(root_rea, "ket_retro_arrow.ket")
filename = "ket_retro_arrow.ket"
fname = os.path.join(root_rea, filename)
rxn = indigo.loadReactionFromFile(fname)
# with open(fname, "w") as file:
# file.write(rxn.json())
Expand All @@ -112,3 +113,13 @@ def getCML(reaction):
else:
print(filename + ":FAILED")
print(diff)
print("issue 2417")
rxn.layout()
# with open(fname, "w") as file:
# file.write(rxn.json())
diff = find_diff(ref_json, rxn.json())
if not diff:
print(filename + ":SUCCEED")
else:
print(filename + ":FAILED")
print(diff)
268 changes: 134 additions & 134 deletions api/tests/integration/tests/formats/reactions/ket_retro_arrow.ket
Original file line number Diff line number Diff line change
@@ -1,135 +1,135 @@
{
"root": {
"nodes": [
{
"$ref": "mol0"
},
{
"$ref": "mol1"
},
{
"type": "arrow",
"data": {
"mode": "retrosynthetic",
"pos": [
{
"x": 17.023752,
"y": -8.175,
"z": 0.0
},
{
"x": 18.750181,
"y": -8.175,
"z": 0.0
}
]
}
}
]
},
"mol0": {
"type": "molecule",
"atoms": [
{
"label": "C",
"location": [
15.246468,
-9.074999,
0.0
]
},
{
"label": "C",
"location": [
15.246468,
-8.075001,
0.0
]
},
{
"label": "C",
"location": [
14.380445,
-7.575001,
0.0
]
},
{
"label": "N",
"location": [
16.112492,
-7.575001,
0.0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
1,
2
]
},
{
"type": 1,
"atoms": [
1,
3
]
}
]
},
"mol1": {
"type": "molecule",
"atoms": [
{
"label": "O",
"location": [
19.987497,
-8.075001,
0.0
]
},
{
"label": "C",
"location": [
20.853495,
-8.575,
0.0
]
},
{
"label": "O",
"location": [
21.719555,
-8.075001,
0.0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
1,
2
]
}
]
}
{
"root": {
"nodes": [
{
"$ref": "mol0"
},
{
"$ref": "mol1"
},
{
"type": "arrow",
"data": {
"mode": "retrosynthetic",
"pos": [
{
"x": 5.171281,
"y": 0.0,
"z": 0.0
},
{
"x": 8.371282,
"y": 0.0,
"z": 0.0
}
]
}
}
]
},
"mol0": {
"type": "molecule",
"atoms": [
{
"label": "C",
"location": [
2.185641,
-1.2,
0.0
]
},
{
"label": "C",
"location": [
2.185641,
0.4,
0.0
]
},
{
"label": "C",
"location": [
0.8,
1.2,
0.0
]
},
{
"label": "N",
"location": [
3.571281,
1.2,
0.0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
1,
2
]
},
{
"type": 1,
"atoms": [
1,
3
]
}
]
},
"mol1": {
"type": "molecule",
"atoms": [
{
"label": "O",
"location": [
9.971282,
0.4,
0.0
]
},
{
"label": "C",
"location": [
11.356922,
-0.4,
0.0
]
},
{
"label": "O",
"location": [
12.742563,
0.4,
0.0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
1,
2
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
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
Loading

0 comments on commit 55473ab

Please sign in to comment.