-
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
- Loading branch information
1 parent
229868c
commit 5a7bfaa
Showing
13 changed files
with
463 additions
and
9 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
api/tests/integration/ref/formats/ket_with_query_properties.py.out
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,2 @@ | ||
*** KET with query properties *** | ||
ket_with_query_properties.ket:SUCCEED |
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
35 changes: 35 additions & 0 deletions
35
api/tests/integration/tests/formats/ket_with_query_properties.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,35 @@ | ||
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 * # noqa | ||
|
||
indigo = Indigo() | ||
indigo.setOption("json-saving-pretty", True) | ||
|
||
print("*** KET with query properties ***") | ||
|
||
ref_path = joinPathPy("ref/", __file__) | ||
name = "ket_with_query_properties.ket" | ||
filename = os.path.join(ref_path, name) | ||
|
||
mol = indigo.loadQueryMoleculeFromFile(filename) | ||
with open(filename, "r") as file: | ||
ket_ref = file.read() | ||
ket = mol.json() | ||
diff = find_diff(ket_ref, ket) | ||
if not diff: | ||
print(name + ":SUCCEED") | ||
else: | ||
print(name + ":FAILED") | ||
print(diff) |
126 changes: 126 additions & 0 deletions
126
api/tests/integration/tests/formats/ref/ket_with_query_properties.ket
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,126 @@ | ||
{ | ||
"root": { | ||
"nodes": [ | ||
{ | ||
"$ref": "mol0" | ||
} | ||
] | ||
}, | ||
"mol0": { | ||
"type": "molecule", | ||
"atoms": [ | ||
{ | ||
"label": "C", | ||
"location": [ | ||
6.3348493576049809, | ||
-5.550074577331543, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
8.06515121459961, | ||
-5.549589157104492, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
7.2016377449035648, | ||
-5.049966812133789, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
8.06515121459961, | ||
-6.55053186416626, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
6.3348493576049809, | ||
-6.555019855499268, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
7.203820705413818, | ||
-7.050033092498779, | ||
0.0 | ||
], | ||
"queryProperties": { | ||
"aromaticity": "aliphatic", | ||
"connectivity": 5, | ||
"ringMembership": 3, | ||
"ringSize": 4 | ||
} | ||
} | ||
], | ||
"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 | ||
] | ||
} | ||
], | ||
"sgroups": [ | ||
{ | ||
"type": "MUL", | ||
"atoms": [ | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5 | ||
], | ||
"mul": 1 | ||
} | ||
] | ||
} | ||
} |
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
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
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
Oops, something went wrong.