diff --git a/docs/contents/notebooks/deep_learning_barrier_heights.ipynb b/docs/contents/notebooks/deep_learning_barrier_heights.ipynb index 9121bc3c..3ae0d9dc 100644 --- a/docs/contents/notebooks/deep_learning_barrier_heights.ipynb +++ b/docs/contents/notebooks/deep_learning_barrier_heights.ipynb @@ -14,7 +14,7 @@ "\n", "----\n", "\n", - "This two-part tutorial showcases how ORCA integrates into downstream deep learning workflows by serving as a data source training and evaluation.\n", + "This two-part tutorial showcases how ORCA integrates into downstream deep learning workflows by serving as a data source for training and evaluation.\n", "1. First, we will show how to calculate the barrier height of a chemical reaction using ORCA with the ORCA Python inferface (OPI). \n", "2. Second, we use the ChemTorch framework to train and evaluate a graph neural network (GNN) on a curated subset of the popular [RGD1 dataset](https://www.nature.com/articles/s41597-023-02043-z) which contains precomputed barrier heights.\n", "\n", @@ -1000,19 +1000,13 @@ "To begin our ML workflow, clone and install ChemTorch following the [official installation instructions](https://github.com/heid-lab/chemtorch) or the command below (for GPU installation, please refer to the installation instructions). We recommend to set up a separate environment than for the first part of this tutorial. \n", "\n", "```bash\n", - "git clone -b tutorial/opi_orca https://github.com/heid-lab/chemtorch.git && \\\n", + "git clone https://github.com/heid-lab/chemtorch.git && \\\n", "cd chemtorch && \\\n", "conda deactivate && \\\n", - "conda create -n chemtorch python=3.10 && \\\n", + "conda env create -f env/environment.yml && \\\n", "conda activate chemtorch && \\\n", - "pip install rdkit numpy==1.26.4 scikit-learn pandas && \\\n", - "pip install torch && \\\n", - "pip install hydra-core && \\\n", - "pip install torch_geometric && \\\n", - "pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.0+cpu.html && \\\n", - "pip install wandb && \\\n", - "pip install ipykernel && \\\n", - "pip install -e .\n", + "uv sync && \\\n", + "uv pip install torch_scatter torch_sparse torch_cluster torch_spline_conv torch_geometric --no-build-isolation\n", "```" ] }, @@ -1039,14 +1033,16 @@ "To use an existing one, run the following command from the `chemtorch` project root:\n", "\n", "```bash\n", - "python chemtorch_cli.py +experiment=graph data_pipeline=rgd1 data_pipeline.data_source.data_path=\"../QM_data_precomputed.csv\"\n", + "chemtorch +experiment=graph data_module.data_pipeline=rgd1 data_module.data_pipeline.data_source.data_path=\"../QM_data_precomputed.csv\"\n", "```\n", "\n", "This tells ChemTorch to use the default graph learning configuration with the RGD1 data pipeline but use our own custom dataset specified via `data_path`.\n", "Under the hood, this setup will convert each reaction SMILES to a condensed graph of reaction (CGR), train a DMPNN, track metrics of interest and save the best performing model parameters for later.\n", "to the CLI as well as [Weights & Biases](https://wandb.ai/site/models/) which is a graphical user interface that can be accessed through the browser.\n", "\n", - "If you would like to make your own configuration file instead, an example is already included in your ChemTorch installation, and can be found in `conf/experiment/opi_tutorial/training.yaml`, so no need to create or change a file. Note that the important lines are setting the `data_pipeline` to `rgd1`, and `data_pipeline/data_source/data_path` to `\"../QM_data_precomputed.csv\"`, just as above. To launch the training process with the config file, run \n", + "If you would like to make your own configuration file instead, an example is already included in your ChemTorch installation, and can be found in `conf/experiment/opi_tutorial/training.yaml`, so no need to create or change a file.\n", + "Note that the important lines are setting the `data_module.data_pipeline` to `rgd1`, and `data_module.data_pipeline/data_source/data_path` to `\"../QM_data_precomputed.csv\"`, just as above.\n", + "To launch the training process with the config file, run \n", "```bash \n", "python chemtorch_cli.py +experiment=opi_tutorial/training\n", "```\n", @@ -1143,7 +1139,7 @@ "source": [ "Overwrite the checkpoint path in the command directly, or replace the `ckpt_path: \"lightning_logs/rgd1/dmpnn/seed_0_YYYY-MM-DD_HH-MM-SS/checkpoints/epoch=XX-step=XXXXX.ckpt\"` with your actual log name from the training run in `conf/experiment/opi_tutorial/inference.yaml`. We will overide it so you don't need to open the file:\n", "```bash\n", - "python chemtorch_cli.py +experiment=opi_tutorial/inference ckpt_path=\"lightning_logs/rgd1/dmpnn/seed_0_2025-08-13_10-28-40/checkpoints/epoch\\=58-step\\=15989.ckpt prediction_save_path=\"../predictions.csv\"\n", + "chemtorch +experiment=opi_tutorial/inference ckpt_path=\"lightning_logs/rgd1/dmpnn/seed_0_2025-08-13_10-28-40/checkpoints/epoch\\=58-step\\=15989.ckpt prediction_save_path=\"../predictions.csv\"\n", "```\n", "When overriding `ckpt_path` in the CLI make sure to wrap the path in double quotes and escape `=` characters by plycing `\\` in front of them like we did.\n", "Remember that the file path will be different for you!\n",