-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2412 - User can't correctly save (or make a layout) to RDF/RXN react…
…ion several products or with separate positioned molecules (#2717)
- Loading branch information
Showing
85 changed files
with
17,029 additions
and
1,283 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*** KET to RXN *** | ||
merge_test1.rxn:SUCCEED | ||
merge_test1a.rxn:SUCCEED | ||
merge_test2.rxn:SUCCEED | ||
merge_test2a.rxn:SUCCEED | ||
merge_test3.rxn:SUCCEED | ||
merge_test3a.rxn:SUCCEED | ||
merge_test4.rxn:SUCCEED | ||
merge_test5.rxn:SUCCEED | ||
merge_test6.rxn:SUCCEED | ||
merge_test7.rxn:SUCCEED | ||
merge_test8.rxn:SUCCEED | ||
merge_test9.rxn: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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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, joinPathPy # noqa | ||
|
||
indigo = Indigo() | ||
indigo.setOption("json-saving-pretty", True) | ||
indigo.setOption("ignore-stereochemistry-errors", True) | ||
indigo.setOption("molfile-saving-skip-date", True) | ||
|
||
print("*** KET to RXN ***") | ||
|
||
root = joinPathPy("reactions/", __file__) | ||
ref_path = joinPathPy("ref/", __file__) | ||
|
||
files = [ | ||
"merge_test1", | ||
"merge_test1a", | ||
"merge_test2", | ||
"merge_test2a", | ||
"merge_test3", | ||
"merge_test3a", | ||
"merge_test4", | ||
"merge_test5", | ||
"merge_test6", | ||
"merge_test7", | ||
"merge_test8", | ||
"merge_test9", | ||
] | ||
|
||
files.sort() | ||
for filename in files: | ||
rea = indigo.loadReactionFromFile(os.path.join(root, filename + ".ket")) | ||
|
||
# with open(os.path.join(ref_path, filename) + ".rxn", "w") as file: | ||
# file.write(rea.rxnfile()) | ||
with open(os.path.join(ref_path, filename) + ".rxn", "r") as file: | ||
rxn_ref = file.read() | ||
rxn = rea.rxnfile() | ||
diff = find_diff(rxn_ref, rxn) | ||
if not diff: | ||
print(filename + ".rxn:SUCCEED") | ||
else: | ||
print(filename + ".rxn:FAILED") | ||
print(diff) |
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.