{
  "id": 509274,
  "title": "how to visualise grad CAM, attnetion map on SMILES string",
  "url": "/competitions/leash-BELKA/discussion/509274",
  "author_name": "hengck23",
  "post_date": "2024-06-01T20:43:23.734000",
  "votes": 10,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I find this wonderful tool:<br>\n<a href=\"https://github.com/Bayer-Group/xsmiles\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles</a><br>\ndemo: <a href=\"https://bayer-group.github.io/xsmiles/dist/web/\" target=\"_blank\">https://bayer-group.github.io/xsmiles/dist/web/</a></p>\n<p><a href=\"https://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb</a><br>\n<a href=\"https://github.com/Bayer-Group/xsmiles-use-cases\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles-use-cases</a></p>\n<pre><code>molecule_with_sequence = {          \n          : (=)()cc(#)cc1Br',\n\n          #  sequence,   the app cannot parse your  correctly you can try  split it  input together  the original \n          : [,, , , , , , , , , , , , , , , , , , , , , , , , , , ,,  ],\n\n          : [{\n            :  perturb',\n            : [\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, ,\n              , , ,\n              -, , ,\n              -, , -,\n              , -, ,\n            ],\n          }],\n          : {\n            : ,          \n            : ,\n             :  octanoate',\n          },\n        }\n\nxsmiles.(molecules=json.dumps([molecule_with_sequence]))\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fe13ba6ca795849f3a379d6dcf3d33465%2FSelection_173.png?generation=1717274771787681&amp;alt=media\"></p>",
  "messages": [
    {
      "id": 2849959,
      "postDate": "2024-06-01T20:43:23.733Z",
      "content": "<p>I find this wonderful tool:<br>\n<a href=\"https://github.com/Bayer-Group/xsmiles\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles</a><br>\ndemo: <a href=\"https://bayer-group.github.io/xsmiles/dist/web/\" target=\"_blank\">https://bayer-group.github.io/xsmiles/dist/web/</a></p>\n<p><a href=\"https://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb</a><br>\n<a href=\"https://github.com/Bayer-Group/xsmiles-use-cases\" target=\"_blank\">https://github.com/Bayer-Group/xsmiles-use-cases</a></p>\n<pre><code>molecule_with_sequence = {          \n          : (=)()cc(#)cc1Br',\n\n          #  sequence,   the app cannot parse your  correctly you can try  split it  input together  the original \n          : [,, , , , , , , , , , , , , , , , , , , , , , , , , , ,,  ],\n\n          : [{\n            :  perturb',\n            : [\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, -,\n              -, -, ,\n              , , ,\n              -, , ,\n              -, , -,\n              , -, ,\n            ],\n          }],\n          : {\n            : ,          \n            : ,\n             :  octanoate',\n          },\n        }\n\nxsmiles.(molecules=json.dumps([molecule_with_sequence]))\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fe13ba6ca795849f3a379d6dcf3d33465%2FSelection_173.png?generation=1717274771787681&amp;alt=media\"></p>",
      "rawMarkdown": "I find this wonderful tool:\nhttps://github.com/Bayer-Group/xsmiles\ndemo: https://bayer-group.github.io/xsmiles/dist/web/\n\nhttps://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb\nhttps://github.com/Bayer-Group/xsmiles-use-cases\n\n```\n\nmolecule_with_sequence = {          \n          'string': 'CCCCCCCC(=O)Oc1c(Br)cc(C#N)cc1Br',\n          \n          # Optional sequence, in case the app cannot parse your string correctly you can try and split it and input together with the original string\n          'sequence': [\"C\",\"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"(\", \"=\", \"O\", \")\", \"O\", \"c\", \"1\", \"c\", \"(\", \"Br\", \")\", \"c\", \"c\", \"(\", \"C\", \"#\", \"N\", \")\", \"c\", \"c\",\"1\", \"Br\" ],\n        \n          'methods': [{\n            'name': 'logBCF perturb',\n            'scores': [\n              -0.1762678623199463, -0.25460100173950195, -0.2712419033050537,\n              -0.2308177947998047, -0.12025833129882812, -0.13311767578125,\n              -0.16690635681152344, -0.27755022048950195, -0.38324832916259766,\n              -0.2450413703918457, -0.3898346424102783, -0.22409844398498535,\n              -0.2113962173461914, -0.12725472450256348, -0.04010510444641113,\n              -0.01143336296081543, -0.05576324462890625, 0.18838262557983398,\n              0.0361400842666626, 0.0019290447235107422, 0.0008728504180908203,\n              -0.028931856155395508, 0.05310940742492676, 0.35703766345977783,\n              -0.16322708129882812, 0.07348740100860596, -0.037914276123046875,\n              0.0180361270904541, -0.047339677810668945, 0.06556379795074463,\n            ],\n          }],\n          'attributes': {\n            'predicted': 5.300230503082275,          \n            'measured': 3.284126043319702,\n            'Compound ID': 'bromoxynil octanoate',\n          },\n        }\n\nxsmiles.XSmilesWidget(molecules=json.dumps([molecule_with_sequence]))\n\n\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fe13ba6ca795849f3a379d6dcf3d33465%2FSelection_173.png?generation=1717274771787681&alt=media)\n",
      "votes": 10
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2849959": "I find this wonderful tool:\nhttps://github.com/Bayer-Group/xsmiles\ndemo: https://bayer-group.github.io/xsmiles/dist/web/\n\nhttps://github.com/Bayer-Group/xsmiles-jupyterlab/blob/main/examples/xsmiles_examples.ipynb\nhttps://github.com/Bayer-Group/xsmiles-use-cases\n\n```\n\nmolecule_with_sequence = {          \n          'string': 'CCCCCCCC(=O)Oc1c(Br)cc(C#N)cc1Br',\n          \n          # Optional sequence, in case the app cannot parse your string correctly you can try and split it and input together with the original string\n          'sequence': [\"C\",\"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"(\", \"=\", \"O\", \")\", \"O\", \"c\", \"1\", \"c\", \"(\", \"Br\", \")\", \"c\", \"c\", \"(\", \"C\", \"#\", \"N\", \")\", \"c\", \"c\",\"1\", \"Br\" ],\n        \n          'methods': [{\n            'name': 'logBCF perturb',\n            'scores': [\n              -0.1762678623199463, -0.25460100173950195, -0.2712419033050537,\n              -0.2308177947998047, -0.12025833129882812, -0.13311767578125,\n              -0.16690635681152344, -0.27755022048950195, -0.38324832916259766,\n              -0.2450413703918457, -0.3898346424102783, -0.22409844398498535,\n              -0.2113962173461914, -0.12725472450256348, -0.04010510444641113,\n              -0.01143336296081543, -0.05576324462890625, 0.18838262557983398,\n              0.0361400842666626, 0.0019290447235107422, 0.0008728504180908203,\n              -0.028931856155395508, 0.05310940742492676, 0.35703766345977783,\n              -0.16322708129882812, 0.07348740100860596, -0.037914276123046875,\n              0.0180361270904541, -0.047339677810668945, 0.06556379795074463,\n            ],\n          }],\n          'attributes': {\n            'predicted': 5.300230503082275,          \n            'measured': 3.284126043319702,\n            'Compound ID': 'bromoxynil octanoate',\n          },\n        }\n\nxsmiles.XSmilesWidget(molecules=json.dumps([molecule_with_sequence]))\n\n\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fe13ba6ca795849f3a379d6dcf3d33465%2FSelection_173.png?generation=1717274771787681&alt=media)\n"
  }
}