-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rgroups (#946) Co-authored-by: Roman Porozhnetov <roman_porozhnetov@epam.com> * CDX import: Reaction arrows disappear when opening a file #943 (#948) * marvin cdx fix * clang fix Co-authored-by: Roman Porozhnetov <roman_porozhnetov@epam.com> * bond order fix * clang fix * test fix * cdx export * clang fixes * cdx python binding * clang fixes * api fixes * cdx export * indigo py fix * cdx * cdx * cdx fixes * clang fix * PR comments * clang fix * pr fix * pr fix * b64cdx java&dotnet fix * b64cdx java&dotnet fix * b64cdx java&dotnet fix * diff fix * test fix * clang fix * mol_to_cdx.out deleted * clang fix * tests fix * tests fix * tests fix * tests fix * tests fix * tests fix * tests fix * tests fix * fix dir * fix dir * fix dir --------- Co-authored-by: Roman Porozhnetov <roman_porozhnetov@epam.com>
- Loading branch information
Showing
105 changed files
with
58,392 additions
and
1,148 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*** Mol to CDX *** | ||
enhanced_stereo1:success | ||
enhanced_stereo2:success | ||
enhanced_stereo3:success | ||
stereo_either-0020:success |
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,54 @@ | ||
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() | ||
|
||
print("*** Mol to CDX ***") | ||
|
||
root = joinPathPy("molecules/", __file__) | ||
files = [ | ||
"stereo_either-0020", | ||
"enhanced_stereo1", | ||
"enhanced_stereo2", | ||
"enhanced_stereo3", | ||
] | ||
|
||
ref_path = joinPathPy("ref/", __file__) | ||
files.sort() | ||
|
||
for filename in files: | ||
try: | ||
mol = indigo.loadMoleculeFromFile( | ||
os.path.join(root, filename + ".mol") | ||
) | ||
resb64 = mol.b64cdx() | ||
# with open(os.path.join(ref_path, filename + ".cdxml"), 'w') as file: | ||
# data = file.write(mol.cdxml()) | ||
with open(os.path.join(ref_path, filename + ".b64cdx"), "r") as file: | ||
refb64 = file.read() | ||
print(filename + (":success" if refb64 == resb64 else ":failed")) | ||
except IndigoException as e: | ||
print(getIndigoExceptionText(e)) | ||
print("*** Try as Query ***") | ||
mol = indigo.loadQueryMoleculeFromFile( | ||
os.path.join(root, filename + ".mol") | ||
) | ||
resb64 = mol.b64cdx() | ||
# with open(os.path.join(ref_path, filename + ".cdxml"), 'w') as file: | ||
# data = file.write(mol.cdxml()) | ||
with open(os.path.join(ref_path, filename + ".b64cdx"), "r") as file: | ||
refb64 = file.read() | ||
print(filename + (":success" if refb64 == resb64 else ":failed")) |
Oops, something went wrong.