Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to check for empty InChI/InChI key and report #6

Open
cjh1 opened this issue Jun 16, 2015 · 0 comments
Open

Need to check for empty InChI/InChI key and report #6

cjh1 opened this issue Jun 16, 2015 · 0 comments

Comments

@cjh1
Copy link
Member

cjh1 commented Jun 16, 2015

We currently have a check for atom count. However, we also need to check if the convertion fails. For example:

$ python mongochem.py ferrocene.cml ferrocene
{'name': 'ferrocene', 'filename': 'ferrocene.cml'}
==============================
*** Open Babel Warning  in GetAtomicNum
  Cannot understand the element label X.
==============================
*** Open Babel Warning  in GetAtomicNum
  Cannot understand the element label X.
==============================
*** Open Babel Warning  in InChI code
  m1 :Unknown element(s): Xx
==============================
*** Open Babel Error  in InChI code
  InChI generation failed
==============================
*** Open Babel Warning  in InChI code
  m1 :Unknown element(s): Xx
==============================
*** Open Babel Error  in InChI code
  InChI generation failed
JSON output follows:
[{"inchikey": "", "xyz": "23\nm1\nC          3.60742        1.17022
    1.70118\nC          2.45209        1.79763        2.19417\nC
   1.36958        1.40787        1.38882\nC          1.85638
0.53814        0.39997\nC          3.23919        0.39222
0.59286\nC          2.15027       -0.67100        4.09665\nC
3.14638       -1.40054        3.42840\nC          2.53860
-2.09663        2.37108\nC          1.16761       -1.79507
2.38537\nC          0.92800       -0.91485        3.45213\nFe
2.24399       -0.15862        2.19981\nXx         2.50493
1.06122        1.25540\nXx         1.98617       -1.37562
3.14673\nH          4.61389        1.26971        2.10767\nH
2.40402        2.46920        3.05136\nH          0.33369
1.72469        1.50995\nH          1.26456        0.06005
-0.38059\nH          3.90960       -0.21830       -0.01205\nH
2.29969       -0.02792        4.96395\nH          4.20544
-1.42263        3.68532\nH          3.04244       -2.75525
1.66364\nH          0.42022       -2.17733        1.69011\nH
-0.03811       -0.49429        3.73118\n", "inchi": "", "name":
"ferrocene"}]
@cryos cryos changed the title Need to check for empty inchi/inchikey and report to user Need to check for empty InChI/InChI key and report Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant