-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Aliakasndr Dziarkach <[email protected]>
- Loading branch information
1 parent
55b4a72
commit b0bf63d
Showing
6 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test passed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"root":{"nodes":[{"$ref":"mol0"},{"$ref":"mol1"},{"$ref":"mol2"},{"$ref":"mol3"},{"type":"arrow","data":{"mode":"open-angle","pos":[{"x":10.515000343322754,"y":-8.324899673461914,"z":0.0},{"x":15.034599304199219,"y":-8.274900436401368,"z":0.0}]}}]},"mol0":{"type":"molecule","atoms":[{"label":"C","location":[7.7846999168396,-7.824999809265137,0.0]},{"label":"C","location":[9.515000343322754,-7.82450008392334,0.0]},{"label":"C","location":[8.65149974822998,-7.324900150299072,0.0]},{"label":"C","location":[9.515000343322754,-8.825400352478028,0.0]},{"label":"C","location":[7.7846999168396,-8.829899787902832,0.0]},{"label":"C","location":[8.65369987487793,-9.324899673461914,0.0]}],"bonds":[{"type":2,"atoms":[2,0]},{"type":2,"atoms":[3,1]},{"type":1,"atoms":[0,4]},{"type":1,"atoms":[1,2]},{"type":2,"atoms":[4,5]},{"type":1,"atoms":[5,3]}]},"mol1":{"type":"molecule","atoms":[{"label":"C","location":[16.03459930419922,-7.775000095367432,0.0]},{"label":"C","location":[17.76499938964844,-7.774499893188477,0.0]},{"label":"C","location":[16.90139961242676,-7.274899959564209,0.0]},{"label":"C","location":[17.76499938964844,-8.775400161743164,0.0]},{"label":"C","location":[16.03459930419922,-8.779899597167969,0.0]},{"label":"C","location":[16.903600692749025,-9.274900436401368,0.0]}],"bonds":[{"type":2,"atoms":[2,0]},{"type":2,"atoms":[3,1]},{"type":1,"atoms":[0,4]},{"type":1,"atoms":[1,2]},{"type":2,"atoms":[4,5]},{"type":1,"atoms":[5,3]}]},"mol2":{"type":"molecule","atoms":[{"label":"Cl","location":[12.974800109863282,-8.824899673461914,0.0]}],"bonds":[]},"mol3":{"type":"molecule","atoms":[{"label":"N","location":[12.549799919128418,-7.724899768829346,0.0]}],"bonds":[]}} |
55 changes: 55 additions & 0 deletions
55
api/tests/integration/tests/reaction/reactions/issue_1205.rxn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
$RXN | ||
|
||
-INDIGO- 0808231408 | ||
|
||
1 1 2 | ||
$MOL | ||
|
||
-INDIGO-08082314082D | ||
|
||
6 6 0 0 0 0 0 0 0 0999 V2000 | ||
7.7847 -7.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
9.5150 -7.8245 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
8.6515 -7.3249 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
9.5150 -8.8254 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
7.7847 -8.8299 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
8.6537 -9.3249 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
3 1 2 0 0 0 0 | ||
4 2 2 0 0 0 0 | ||
1 5 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
5 6 2 0 0 0 0 | ||
6 4 1 0 0 0 0 | ||
M END | ||
$MOL | ||
|
||
-INDIGO-08082314082D | ||
|
||
6 6 0 0 0 0 0 0 0 0999 V2000 | ||
16.0346 -7.7750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
17.7650 -7.7745 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
16.9014 -7.2749 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
17.7650 -8.7754 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
16.0346 -8.7799 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
16.9036 -9.2749 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
3 1 2 0 0 0 0 | ||
4 2 2 0 0 0 0 | ||
1 5 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
5 6 2 0 0 0 0 | ||
6 4 1 0 0 0 0 | ||
M END | ||
$MOL | ||
|
||
-INDIGO-08082314082D | ||
|
||
1 0 0 0 0 0 0 0 0 0999 V2000 | ||
12.9748 -8.8249 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0 | ||
M END | ||
$MOL | ||
|
||
-INDIGO-08082314082D | ||
|
||
1 0 0 0 0 0 0 0 0 0999 V2000 | ||
12.5498 -7.7249 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 | ||
M END |
28 changes: 28 additions & 0 deletions
28
api/tests/integration/tests/reaction/save_ket_layout_1205.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import difflib | ||
import os | ||
import sys | ||
|
||
|
||
def find_diff(a, b): | ||
return "\n".join(difflib.unified_diff(a.splitlines(), b.splitlines())) | ||
|
||
|
||
sys.path.append( | ||
os.path.normpath( | ||
os.path.join(os.path.abspath(__file__), "..", "..", "..", "common") | ||
) | ||
) | ||
from env_indigo import * | ||
|
||
indigo = Indigo() | ||
r1 = indigo.loadReactionFromFile( | ||
joinPathPy("reactions/issue_1205.rxn", __file__) | ||
) | ||
with open(joinPathPy("reactions/issue_1205.ket", __file__), "r") as file: | ||
ket_ref = file.read() | ||
ket_out = r1.json() | ||
diff = find_diff(ket_ref, ket_out) | ||
if diff: | ||
print("Difference found:\n", diff) | ||
else: | ||
print("Test passed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters