{
  "id": 225876,
  "title": "PubChem molecule structure generator (InChI to PNG)",
  "url": "/competitions/bms-molecular-translation/discussion/225876",
  "author_name": "Adrian Brodzik",
  "post_date": "2021-03-14T12:44:19.140000",
  "votes": 12,
  "comment_count": 4,
  "views": 0,
  "content": "<h4><strong>EDIT:</strong> actually <a href=\"https://www.rdkit.org/\" target=\"_blank\">rdkit</a> package might be better than PubChem API</h4>\n<h4><strong>EDIT2:</strong> ok, it is better and can be done locally like in this <a href=\"https://www.kaggle.com/brodzik/drawing-molecules-with-rdkit-inchi-to-png\" target=\"_blank\">notebook</a></h4>\n<p>API:<br>\n<a href=\"https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest\" target=\"_blank\">https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest</a></p>\n<p>Request:</p>\n<blockquote>\n  <p>curl -d \"inchi=InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)14/h5-7,9,11,14H,8H2,1-4H3\" -X POST <a href=\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png\" target=\"_blank\">https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png</a> --output test.png</p>\n</blockquote>\n<p>Output:<br>\n<img src=\"https://i.imgur.com/9aeBCDM.png\" alt=\"\"></p>\n<p>Original from train dataset:<br>\n<img src=\"https://i.imgur.com/mj5ikC6.png\" alt=\"\"></p>",
  "messages": [
    {
      "id": 1237763,
      "postDate": "2021-03-14T12:44:19.140Z",
      "content": "<h4><strong>EDIT:</strong> actually <a href=\"https://www.rdkit.org/\" target=\"_blank\">rdkit</a> package might be better than PubChem API</h4>\n<h4><strong>EDIT2:</strong> ok, it is better and can be done locally like in this <a href=\"https://www.kaggle.com/brodzik/drawing-molecules-with-rdkit-inchi-to-png\" target=\"_blank\">notebook</a></h4>\n<p>API:<br>\n<a href=\"https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest\" target=\"_blank\">https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest</a></p>\n<p>Request:</p>\n<blockquote>\n  <p>curl -d \"inchi=InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)14/h5-7,9,11,14H,8H2,1-4H3\" -X POST <a href=\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png\" target=\"_blank\">https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png</a> --output test.png</p>\n</blockquote>\n<p>Output:<br>\n<img src=\"https://i.imgur.com/9aeBCDM.png\" alt=\"\"></p>\n<p>Original from train dataset:<br>\n<img src=\"https://i.imgur.com/mj5ikC6.png\" alt=\"\"></p>",
      "rawMarkdown": "#### **EDIT:** actually [rdkit](https://www.rdkit.org/) package might be better than PubChem API\n#### **EDIT2:** ok, it is better and can be done locally like in this [notebook](https://www.kaggle.com/brodzik/drawing-molecules-with-rdkit-inchi-to-png)\n\nAPI:\n[https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest](https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest)\n\nRequest:\n> curl -d \"inchi=InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)14/h5-7,9,11,14H,8H2,1-4H3\" -X POST https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png --output test.png\n\nOutput:\n![](https://i.imgur.com/9aeBCDM.png)\n\nOriginal from train dataset:\n![](https://i.imgur.com/mj5ikC6.png)",
      "votes": 11
    },
    {
      "id": 1241327,
      "postDate": "2021-03-17T02:05:49.463Z",
      "content": "<p>good work.</p>\n<p>you need an alignment algorithm</p>\n<p>you need a noise generator as well.</p>\n<p>a difficult way is to make a GAN to translate from clean(rdkit) to noisy (kaggle), and maybe vice verus</p>",
      "rawMarkdown": "good work.\n\n you need an alignment algorithm\n\n you need a noise generator as well.\n\na difficult way is to make a GAN to translate from clean(rdkit) to noisy (kaggle), and maybe vice verus",
      "votes": 1
    },
    {
      "id": 1237933,
      "postDate": "2021-03-14T14:04:48.533Z",
      "content": "<p>Woa, it's the same image, just rotated. I guess that this the advantage of using <strong>InChI</strong> notation, reproducible results. Thanks for share.</p>",
      "rawMarkdown": "Woa, it's the same image, just rotated. I guess that this the advantage of using **InChI** notation, reproducible results. Thanks for share.",
      "votes": -1
    },
    {
      "id": 1263640,
      "postDate": "2021-04-05T15:04:49.490Z",
      "content": "<p>Even the images generated by rdkit are a little bit different from the images for this competition.<br>\nI wonder how hosts generated images for this competition.</p>",
      "rawMarkdown": "Even the images generated by rdkit are a little bit different from the images for this competition.\nI wonder how hosts generated images for this competition."
    },
    {
      "id": 1238041,
      "postDate": "2021-03-14T15:34:47.187Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1241327,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2021-03-17T02:05:49.463000",
      "content": "<p>good work.</p>\n<p>you need an alignment algorithm</p>\n<p>you need a noise generator as well.</p>\n<p>a difficult way is to make a GAN to translate from clean(rdkit) to noisy (kaggle), and maybe vice verus</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1237933,
      "author_name": "Hiram Coria 🧬",
      "author_url": "",
      "post_date": "2021-03-14T14:04:48.533000",
      "content": "<p>Woa, it's the same image, just rotated. I guess that this the advantage of using <strong>InChI</strong> notation, reproducible results. Thanks for share.</p>",
      "votes": -1,
      "replies": []
    },
    {
      "id": 1263640,
      "author_name": "toshi_k",
      "author_url": "",
      "post_date": "2021-04-05T15:04:49.490000",
      "content": "<p>Even the images generated by rdkit are a little bit different from the images for this competition.<br>\nI wonder how hosts generated images for this competition.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1238041,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-03-14T15:34:47.187000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1237763": "#### **EDIT:** actually [rdkit](https://www.rdkit.org/) package might be better than PubChem API\n#### **EDIT2:** ok, it is better and can be done locally like in this [notebook](https://www.kaggle.com/brodzik/drawing-molecules-with-rdkit-inchi-to-png)\n\nAPI:\n[https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest](https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest)\n\nRequest:\n> curl -d \"inchi=InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)14/h5-7,9,11,14H,8H2,1-4H3\" -X POST https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchi/png --output test.png\n\nOutput:\n![](https://i.imgur.com/9aeBCDM.png)\n\nOriginal from train dataset:\n![](https://i.imgur.com/mj5ikC6.png)",
    "1241327": "good work.\n\n you need an alignment algorithm\n\n you need a noise generator as well.\n\na difficult way is to make a GAN to translate from clean(rdkit) to noisy (kaggle), and maybe vice verus",
    "1237933": "Woa, it's the same image, just rotated. I guess that this the advantage of using **InChI** notation, reproducible results. Thanks for share.",
    "1263640": "Even the images generated by rdkit are a little bit different from the images for this competition.\nI wonder how hosts generated images for this competition.",
    "1238041": ""
  }
}