{"id":19274647,"url":"https://github.com/kjappelbaum/ml_molsim","last_synced_at":"2025-04-21T22:33:54.536Z","repository":{"id":103752065,"uuid":"229017424","full_name":"kjappelbaum/ml_molsim","owner":"kjappelbaum","description":"Machine learning exercises for the MolSim course (http://www.acmm.nl/molsim/molsim2023/index.html)","archived":false,"fork":false,"pushed_at":"2024-01-16T11:06:54.000Z","size":37427,"stargazers_count":26,"open_issues_count":5,"forks_count":15,"subscribers_count":2,"default_branch":"2024","last_synced_at":"2025-04-18T21:10:04.955Z","etag":null,"topics":["hands","machine-learning","mof","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kjappelbaum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-19T09:13:33.000Z","updated_at":"2025-02-23T16:31:43.000Z","dependencies_parsed_at":"2024-01-14T16:32:52.628Z","dependency_job_id":null,"html_url":"https://github.com/kjappelbaum/ml_molsim","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjappelbaum%2Fml_molsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjappelbaum%2Fml_molsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjappelbaum%2Fml_molsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjappelbaum%2Fml_molsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjappelbaum","download_url":"https://codeload.github.com/kjappelbaum/ml_molsim/tar.gz/refs/heads/2024","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250145656,"owners_count":21382461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hands","machine-learning","mof","tutorial"],"created_at":"2024-11-09T20:46:51.063Z","updated_at":"2025-04-21T22:33:49.520Z","avatar_url":"https://github.com/kjappelbaum.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ML workshop for MolSim 2024\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/kjappelbaum/ml_molsim/blob/2024/molsim_ml.ipynb)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kjappelbaum/ml_molsim/2024?filepath=molsim_ml.ipynb)\n[![](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/download/releases/3.7.0/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Actions Status](https://github.com/kjappelbaum/ml_molsim/workflows/Python%20package/badge.svg)](https://github.com/kjappelbaum/ml_molsim/actions)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3605363.svg)](https://doi.org/10.5281/zenodo.3605363)\n\nIn this exercise we will build a simple model that can predict the carbon dioxide uptake in MOFs. The goal is to get familiar with the tools that are used for machine learning and to develop an understanding of the workflow, tricks, and pitfalls (e.g., why baselines are important). Some more of the theory can be found [in our review](https://pubs.acs.org/doi/abs/10.1021/acs.chemrev.0c00004).\n\n![Parity plot result](assets/result.gif)\n\nIf you find some errors, typos or issues feel free to [open an issue](https://help.github.com/en/github/managing-your-work-on-github/about-issues) or directly make a [pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).\n\n# How to run it\n\nIf you have a modern laptop, we recommend you run them\non the laptop. If you do not want to use your machine or the cluster, you\ncan also run the exercises on Google Colab.\n\n## Some tips\n\n- If you are not with the Python data science stack, we can recommend you [some cheatsheets](https://www.utc.fr/~jlaforet/Suppl/python-cheatsheets.pdf).\n- If you are not familiar with a function you can get help in a Jupyter notebook by going into the parentheses of a function and hitting SHIFT + ENTER, alternatively, you can just prepend a variable/function/library with `?`, e.g., `?str.replace()`\n- The errors you'll run into are most likely some that someone else already encountered. If you copy/paste the error message into a search engine like Google you will often find the solution to your problem on a site like StackOverflow\n- [Here](https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/) are some nice tips/tricks for using Jupyter notebooks\n- For plotting, we use the [holoviews library](https://holoviews.org/) as it is one of the simplest ways to create interactive figures in Python (it is a high-level interface to the [bokeh library](https://bokeh.org/)). You mind find the [Getting Started section of the documentation](https://holoviews.org/getting_started/) useful if you want to understand it better. I also found [this guide from Caltech](http://bebi103.caltech.edu.s3-website-us-east-1.amazonaws.com/2019a/content/lessons/lesson_03/intro_to_holoviews.html) useful.\n\n## Run it locally (recommended)\n\nThe following steps assume that you use MacOS or some Linux flavor. If you use Windows, we recommend that you first install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10).\n\nCreate a new folder and clone this repository (you need `git` for this, if you get a `missing command` error for `git` you can install it with `sudo apt-get install git`)\n\n```bash\ngit clone --depth 1 https://github.com/kjappelbaum/ml_molsim.git\\\ngit checkout 2024\ncd ml_molsim\n```\n\nWe recommend that you create a virtual conda environment on your computer in which you install the dependencies for this exercise. To do so head over to [Miniconda](https://docs.conda.io/en/latest/miniconda.html) and follow the installation instructions there.\n\nThen, use\n\n```bash\nconda env create -f environment.yml -n ml_molsim\n```\n\nYou can activate this environment using\n\n```bash\nconda activate ml_molsim\n```\n\nAfter this you can start Jupyter Lab and select the `molsim_ml.ipynb` file from the file browser.\n\n```(bash)\njupyter lab\n```\n\nMake sure that the notebook kernel runs in the correct environment:\n\n![Environment name](assets/conda_env_name.png)\n\nIf the environment name that is shown is different from \"ml_molsim\" you can click on it and select the correct one.\n\n## Use it on Google Colab\n\n![Screenshot of the Colab environment](assets/colab.png)\n\nHere, you can use relatively powerful computing resources (like [GPUs](https://en.wikipedia.org/wiki/Graphics_processing_unit) and [TPUs](https://en.wikipedia.org/wiki/Tensor_Processing_Unit)) from Google for free.\nClick the \"Open in Colab\" button on the top, then make a copy of the notebook into your Google Drive, and run the first three cells to\ninstall the dependencies.\nThen you should be able to use the notebook in Colab.\n\n![Making a copy in Colab](assets/save_copy_colab.png)\n\n**Make sure to make a copy into your Google Drive and work on this copy. And\nnot on the shared notebook!**\n\n_Note:_ If you have a Google Account from your organization, e.g. university, you might\nneed to log out and use your personal account as many organizations block\nthird-party applications.\n\n_Note:_ Google Colab also requires that you reload the JavaScript of holoviews in each plotting cell.\nSo, you have to start every cell with a holoviews plot with `hv.extension('bokeh')`\n\n## Acknowledgements\n\nWe want to thank [Leopold Talirz](https://github.com/ltalirz) for incredibly valuable feedback and input during the initial phases of development.\nWe also want to thank Peter Alexander Knudsen for spotting typos, as well as [Prof. Tristan Bereau](https://github.com/tbereau) and all MolSim participant and TAs for feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjappelbaum%2Fml_molsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjappelbaum%2Fml_molsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjappelbaum%2Fml_molsim/lists"}