{
  "id": 499455,
  "title": "Faster and more efficient fingerprint calculation",
  "url": "/competitions/leash-BELKA/discussion/499455",
  "author_name": "",
  "post_date": "2024-05-01T19:24:18.188995900Z",
  "votes": 32,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi, I've joined the competition about a week ago and one of the main issues I've seen other people struggling with is the computation of molecular fingerprints. For new contestants: molecular fingerprints are algorithms for obtaining features from molecular graphs. Happily, not so long ago, me and a few of my colleagues created a library for efficient calculation of fingerprints.</p>\n<p>The library is called <a href=\"https://github.com/scikit-fingerprints/scikit-fingerprints\" target=\"_blank\">scikit-fingerprints</a>. It has already been released, is pip-installable, and is still actively developed to add new functionalities and extend already existing ones. I've been using it since the beginning of the competition and thought I'd share it with you, because it is very convenient. 😊</p>\n<p>Main benefits of this solution:</p>\n<ul>\n<li>parallel computation</li>\n<li>20+ implemented fingerprint algorithms</li>\n<li>scikit-learn-like interface, which allows you to plug it directly into your pipeline</li>\n<li>clear <a href=\"https://scikit-fingerprints.github.io/scikit-fingerprints/\" target=\"_blank\">documentation</a></li>\n</ul>\n<p>Here I've prepared a short notebook to showcase the use of scikit-fingerprints: <a href=\"https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints\" target=\"_blank\">https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints</a><br>\nYou can see on this example a <strong>x10 times</strong> speed-up over usual sequential RDKit calculations!</p>\n<p>If you found the library useful, please consider leaving us a star on <a href=\"https://github.com/scikit-fingerprints/scikit-fingerprints\" target=\"_blank\">GitHub</a> ⭐ (Google has a problem with indexing our repository for some reason, so it would be of a great help 😅)</p>",
  "messages": [
    {
      "id": "2787533",
      "postDate": "05/01/2024 19:24:18",
      "content": "<p>Hi, I've joined the competition about a week ago and one of the main issues I've seen other people struggling with is the computation of molecular fingerprints. For new contestants: molecular fingerprints are algorithms for obtaining features from molecular graphs. Happily, not so long ago, me and a few of my colleagues created a library for efficient calculation of fingerprints.</p>\n<p>The library is called <a href=\"https://github.com/scikit-fingerprints/scikit-fingerprints\" target=\"_blank\">scikit-fingerprints</a>. It has already been released, is pip-installable, and is still actively developed to add new functionalities and extend already existing ones. I've been using it since the beginning of the competition and thought I'd share it with you, because it is very convenient. 😊</p>\n<p>Main benefits of this solution:</p>\n<ul>\n<li>parallel computation</li>\n<li>20+ implemented fingerprint algorithms</li>\n<li>scikit-learn-like interface, which allows you to plug it directly into your pipeline</li>\n<li>clear <a href=\"https://scikit-fingerprints.github.io/scikit-fingerprints/\" target=\"_blank\">documentation</a></li>\n</ul>\n<p>Here I've prepared a short notebook to showcase the use of scikit-fingerprints: <a href=\"https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints\" target=\"_blank\">https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints</a><br>\nYou can see on this example a <strong>x10 times</strong> speed-up over usual sequential RDKit calculations!</p>\n<p>If you found the library useful, please consider leaving us a star on <a href=\"https://github.com/scikit-fingerprints/scikit-fingerprints\" target=\"_blank\">GitHub</a> ⭐ (Google has a problem with indexing our repository for some reason, so it would be of a great help 😅)</p>",
      "rawMarkdown": "Hi, I've joined the competition about a week ago and one of the main issues I've seen other people struggling with is the computation of molecular fingerprints. For new contestants: molecular fingerprints are algorithms for obtaining features from molecular graphs. Happily, not so long ago, me and a few of my colleagues created a library for efficient calculation of fingerprints.\n\nThe library is called [scikit-fingerprints](https://github.com/scikit-fingerprints/scikit-fingerprints). It has already been released, is pip-installable, and is still actively developed to add new functionalities and extend already existing ones. I've been using it since the beginning of the competition and thought I'd share it with you, because it is very convenient. 😊\n\nMain benefits of this solution:\n- parallel computation\n- 20+ implemented fingerprint algorithms\n- scikit-learn-like interface, which allows you to plug it directly into your pipeline\n- clear [documentation](https://scikit-fingerprints.github.io/scikit-fingerprints/)\n\nHere I've prepared a short notebook to showcase the use of scikit-fingerprints: https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints\nYou can see on this example a **x10 times** speed-up over usual sequential RDKit calculations!\n\nIf you found the library useful, please consider leaving us a star on [GitHub](https://github.com/scikit-fingerprints/scikit-fingerprints) ⭐ (Google has a problem with indexing our repository for some reason, so it would be of a great help 😅)",
      "votes": null
    },
    {
      "id": "2787808",
      "postDate": "05/02/2024 00:23:41",
      "content": "<p>Hey, this is pretty cool! I've been using multiprocessing libraries to speed up fingerprinting, but this seems nice! Looks like you've got quite a bit more fingerprints here than RDKit as well. I'll be trying this out and will update if I find something cool.</p>\n<p>One quick note: is there a way to edit the docs to have links to papers or libraries you used to generate the fingerprints? Example: is the ECFP fingerprint actually the Biovia implementation of ECFP or is it more like a Morgan fingerprint?</p>",
      "rawMarkdown": "Hey, this is pretty cool! I've been using multiprocessing libraries to speed up fingerprinting, but this seems nice! Looks like you've got quite a bit more fingerprints here than RDKit as well. I'll be trying this out and will update if I find something cool.\n\nOne quick note: is there a way to edit the docs to have links to papers or libraries you used to generate the fingerprints? Example: is the ECFP fingerprint actually the Biovia implementation of ECFP or is it more like a Morgan fingerprint?",
      "votes": null
    },
    {
      "id": "2788674",
      "postDate": "05/02/2024 10:47:37",
      "content": "<p>Hey, thanks, and you've made a good point. I will edit the docs, to add this information. And to answer the question: it's like a Morgan fp - same algorithm as in RDKit.</p>",
      "rawMarkdown": "Hey, thanks, and you've made a good point. I will edit the docs, to add this information. And to answer the question: it's like a Morgan fp - same algorithm as in RDKit.",
      "votes": null
    },
    {
      "id": "2788693",
      "postDate": "05/02/2024 11:02:47",
      "content": "<p>Awesome, looking forward to using the library!</p>",
      "rawMarkdown": "Awesome, looking forward to using the library!",
      "votes": null
    },
    {
      "id": "2796363",
      "postDate": "05/06/2024 07:37:58",
      "content": "<p>Wow looks great! Especially for this comp  with so much data - you are going to save a lot of trees ;)</p>",
      "rawMarkdown": "Wow looks great! Especially for this comp  with so much data - you are going to save a lot of trees ;)",
      "votes": null
    },
    {
      "id": "2797413",
      "postDate": "05/06/2024 17:08:21",
      "content": "<p>Hey, I am trying to use the skfp library on Google Colab with the TPU v2, however, I am getting the following import error: ImportError: cannot import name 'Interval' from 'sklearn.utils' (/usr/local/lib/python3.10/dist-packages/sklearn/utils/<strong>init</strong>.py) when I try to import the ECFPFingerprint class. I have manually verified that I have scikit-learn installed, but that does not seem to help. Thanks</p>",
      "rawMarkdown": "Hey, I am trying to use the skfp library on Google Colab with the TPU v2, however, I am getting the following import error: ImportError: cannot import name 'Interval' from 'sklearn.utils' (/usr/local/lib/python3.10/dist-packages/sklearn/utils/__init__.py) when I try to import the ECFPFingerprint class. I have manually verified that I have scikit-learn installed, but that does not seem to help. Thanks",
      "votes": null
    },
    {
      "id": "2797508",
      "postDate": "05/06/2024 18:12:24",
      "content": "<p>Hi, you're right, I've just tested it myself. It seems to be a problem with the version of scikit-learn on colab - there must have been an update recently. If you may, please create an issue on github, so we won't forget about this problem. For now, I've checked, that you can simply do <code>!pip uninstall scikit-learn</code> and then <code>!pip install scikit-fingerprints</code>, so the working version will be installed from the library requirements.</p>",
      "rawMarkdown": "Hi, you're right, I've just tested it myself. It seems to be a problem with the version of scikit-learn on colab - there must have been an update recently. If you may, please create an issue on github, so we won't forget about this problem. For now, I've checked, that you can simply do `!pip uninstall scikit-learn` and then `!pip install scikit-fingerprints`, so the working version will be installed from the library requirements.",
      "votes": null
    },
    {
      "id": "2797541",
      "postDate": "05/06/2024 18:46:49",
      "content": "<p>Thanks for the solution, I will give it a shot. An issue has been filed on the repository.</p>",
      "rawMarkdown": "Thanks for the solution, I will give it a shot. An issue has been filed on the repository.",
      "votes": null
    },
    {
      "id": "2802176",
      "postDate": "05/08/2024 22:11:26",
      "content": "<p>Thanks! You've just saved me approx 10 hours of train dataset preprocessing :)</p>",
      "rawMarkdown": "Thanks! You've just saved me approx 10 hours of train dataset preprocessing :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2787808,
      "author_name": "chemdatafarmer",
      "author_url": "",
      "post_date": "05/02/2024 00:23:41",
      "content": "<p>Hey, this is pretty cool! I've been using multiprocessing libraries to speed up fingerprinting, but this seems nice! Looks like you've got quite a bit more fingerprints here than RDKit as well. I'll be trying this out and will update if I find something cool.</p>\n<p>One quick note: is there a way to edit the docs to have links to papers or libraries you used to generate the fingerprints? Example: is the ECFP fingerprint actually the Biovia implementation of ECFP or is it more like a Morgan fingerprint?</p>",
      "votes": null,
      "replies": [
        {
          "id": 2788674,
          "author_name": "michaszafarczyk",
          "author_url": "",
          "post_date": "05/02/2024 10:47:37",
          "content": "<p>Hey, thanks, and you've made a good point. I will edit the docs, to add this information. And to answer the question: it's like a Morgan fp - same algorithm as in RDKit.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2788693,
              "author_name": "chemdatafarmer",
              "author_url": "",
              "post_date": "05/02/2024 11:02:47",
              "content": "<p>Awesome, looking forward to using the library!</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2796363,
      "author_name": "narsil",
      "author_url": "",
      "post_date": "05/06/2024 07:37:58",
      "content": "<p>Wow looks great! Especially for this comp  with so much data - you are going to save a lot of trees ;)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2797413,
      "author_name": "tomprak",
      "author_url": "",
      "post_date": "05/06/2024 17:08:21",
      "content": "<p>Hey, I am trying to use the skfp library on Google Colab with the TPU v2, however, I am getting the following import error: ImportError: cannot import name 'Interval' from 'sklearn.utils' (/usr/local/lib/python3.10/dist-packages/sklearn/utils/<strong>init</strong>.py) when I try to import the ECFPFingerprint class. I have manually verified that I have scikit-learn installed, but that does not seem to help. Thanks</p>",
      "votes": null,
      "replies": [
        {
          "id": 2797508,
          "author_name": "michaszafarczyk",
          "author_url": "",
          "post_date": "05/06/2024 18:12:24",
          "content": "<p>Hi, you're right, I've just tested it myself. It seems to be a problem with the version of scikit-learn on colab - there must have been an update recently. If you may, please create an issue on github, so we won't forget about this problem. For now, I've checked, that you can simply do <code>!pip uninstall scikit-learn</code> and then <code>!pip install scikit-fingerprints</code>, so the working version will be installed from the library requirements.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2797541,
              "author_name": "tomprak",
              "author_url": "",
              "post_date": "05/06/2024 18:46:49",
              "content": "<p>Thanks for the solution, I will give it a shot. An issue has been filed on the repository.</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2802176,
      "author_name": "victorshlepov",
      "author_url": "",
      "post_date": "05/08/2024 22:11:26",
      "content": "<p>Thanks! You've just saved me approx 10 hours of train dataset preprocessing :)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2787533": "Hi, I've joined the competition about a week ago and one of the main issues I've seen other people struggling with is the computation of molecular fingerprints. For new contestants: molecular fingerprints are algorithms for obtaining features from molecular graphs. Happily, not so long ago, me and a few of my colleagues created a library for efficient calculation of fingerprints.\n\nThe library is called [scikit-fingerprints](https://github.com/scikit-fingerprints/scikit-fingerprints). It has already been released, is pip-installable, and is still actively developed to add new functionalities and extend already existing ones. I've been using it since the beginning of the competition and thought I'd share it with you, because it is very convenient. 😊\n\nMain benefits of this solution:\n- parallel computation\n- 20+ implemented fingerprint algorithms\n- scikit-learn-like interface, which allows you to plug it directly into your pipeline\n- clear [documentation](https://scikit-fingerprints.github.io/scikit-fingerprints/)\n\nHere I've prepared a short notebook to showcase the use of scikit-fingerprints: https://www.kaggle.com/code/michaszafarczyk/molecular-fingerprints-using-scikit-fingerprints\nYou can see on this example a **x10 times** speed-up over usual sequential RDKit calculations!\n\nIf you found the library useful, please consider leaving us a star on [GitHub](https://github.com/scikit-fingerprints/scikit-fingerprints) ⭐ (Google has a problem with indexing our repository for some reason, so it would be of a great help 😅)",
    "2787808": "Hey, this is pretty cool! I've been using multiprocessing libraries to speed up fingerprinting, but this seems nice! Looks like you've got quite a bit more fingerprints here than RDKit as well. I'll be trying this out and will update if I find something cool.\n\nOne quick note: is there a way to edit the docs to have links to papers or libraries you used to generate the fingerprints? Example: is the ECFP fingerprint actually the Biovia implementation of ECFP or is it more like a Morgan fingerprint?",
    "2788674": "Hey, thanks, and you've made a good point. I will edit the docs, to add this information. And to answer the question: it's like a Morgan fp - same algorithm as in RDKit.",
    "2788693": "Awesome, looking forward to using the library!",
    "2796363": "Wow looks great! Especially for this comp  with so much data - you are going to save a lot of trees ;)",
    "2797413": "Hey, I am trying to use the skfp library on Google Colab with the TPU v2, however, I am getting the following import error: ImportError: cannot import name 'Interval' from 'sklearn.utils' (/usr/local/lib/python3.10/dist-packages/sklearn/utils/__init__.py) when I try to import the ECFPFingerprint class. I have manually verified that I have scikit-learn installed, but that does not seem to help. Thanks",
    "2797508": "Hi, you're right, I've just tested it myself. It seems to be a problem with the version of scikit-learn on colab - there must have been an update recently. If you may, please create an issue on github, so we won't forget about this problem. For now, I've checked, that you can simply do `!pip uninstall scikit-learn` and then `!pip install scikit-fingerprints`, so the working version will be installed from the library requirements.",
    "2797541": "Thanks for the solution, I will give it a shot. An issue has been filed on the repository.",
    "2802176": "Thanks! You've just saved me approx 10 hours of train dataset preprocessing :)"
  },
  "source": "meta"
}