diff --git a/basics.md b/basics.md new file mode 100644 index 0000000..558d704 --- /dev/null +++ b/basics.md @@ -0,0 +1,8 @@ +# Python Basics + +```{toctree} Table of Contents + +python-basics.ipynb +pandas.ipynb +visualization.ipynb +``` \ No newline at end of file diff --git a/case-studies.md b/case-studies.md new file mode 100644 index 0000000..ffd8eb4 --- /dev/null +++ b/case-studies.md @@ -0,0 +1,7 @@ +# Case Studies + +```{toctree} Table of Contents + +linear_fitting.ipynb +xps_processing.ipynb +``` \ No newline at end of file diff --git a/conf.py b/conf.py index 9a96dcd..4d604e7 100644 --- a/conf.py +++ b/conf.py @@ -14,7 +14,7 @@ # -- Project information ----------------------------------------------------- -project = 'python-scripting-chemists' +project = 'python-scripting-experimental' copyright = ("2023, The Molecular Sciences Software Institute") author = 'Jessica Nash' @@ -109,7 +109,7 @@ "logo": { "image_light": "molssi_main_logo.png", "image_dark": "molssi_main_logo_inverted_white.png", - "text": "Python for Chemists", + "text": "Python for Experimental Chemists", "molssi_light": "molssi_main_logo.png", "molssi_dark": "molssi_main_logo_inverted_white.png", }, @@ -123,12 +123,15 @@ "footer_start": [ "molssi_footer" ], "footer_end": [], "icon_links": [], + "navbar_align": "left", } html_theme_options["analytics"] = { "google_analytics_id": "G-FHKVGE8HKZ", } +#html_sidebars = {} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/notebooks/data/1-2-benzenediol.jdx b/data/1-2-benzenediol.jdx similarity index 100% rename from notebooks/data/1-2-benzenediol.jdx rename to data/1-2-benzenediol.jdx diff --git a/notebooks/data/PubChemElements_all.csv b/data/PubChemElements_all.csv similarity index 100% rename from notebooks/data/PubChemElements_all.csv rename to data/PubChemElements_all.csv diff --git a/notebooks/data/absorbance_data.csv b/data/absorbance_data.csv similarity index 100% rename from notebooks/data/absorbance_data.csv rename to data/absorbance_data.csv diff --git a/notebooks/data/benzealdehyde.jdx b/data/benzealdehyde.jdx similarity index 100% rename from notebooks/data/benzealdehyde.jdx rename to data/benzealdehyde.jdx diff --git a/notebooks/data/benzene.jdx b/data/benzene.jdx similarity index 100% rename from notebooks/data/benzene.jdx rename to data/benzene.jdx diff --git a/notebooks/data/fluorobenzene.jdx b/data/fluorobenzene.jdx similarity index 100% rename from notebooks/data/fluorobenzene.jdx rename to data/fluorobenzene.jdx diff --git a/notebooks/data/ground_water.csv b/data/ground_water.csv similarity index 100% rename from notebooks/data/ground_water.csv rename to data/ground_water.csv diff --git a/notebooks/data/protein_assay.csv b/data/protein_assay.csv similarity index 100% rename from notebooks/data/protein_assay.csv rename to data/protein_assay.csv diff --git a/notebooks/data/protein_samples.csv b/data/protein_samples.csv similarity index 100% rename from notebooks/data/protein_samples.csv rename to data/protein_samples.csv diff --git a/notebooks/data/toluene.jdx b/data/toluene.jdx similarity index 100% rename from notebooks/data/toluene.jdx rename to data/toluene.jdx diff --git a/notebooks/images/list_index.png b/images/list_index.png similarity index 100% rename from notebooks/images/list_index.png rename to images/list_index.png diff --git a/images/open-in-jupyterlab.png b/images/open-in-jupyterlab.png new file mode 100644 index 0000000..b5640f9 Binary files /dev/null and b/images/open-in-jupyterlab.png differ diff --git a/notebooks/images/peak_index.png b/images/peak_index.png similarity index 100% rename from notebooks/images/peak_index.png rename to images/peak_index.png diff --git a/notebooks/images/scipy_find_peaks.png b/images/scipy_find_peaks.png similarity index 100% rename from notebooks/images/scipy_find_peaks.png rename to images/scipy_find_peaks.png diff --git a/index.md b/index.md index 9ca0069..e14e7a8 100644 --- a/index.md +++ b/index.md @@ -1,11 +1,9 @@ # Python Scripting for Experimental Chemists -```{toctree} Table of Contents - -notebooks/python-basics.ipynb -notebooks/pandas.ipynb -notebooks/visualization.ipynb -notebooks/linear_fitting.ipynb -notebooks/xps_processing.ipynb +```{toctree} Table of +:maxdepth: 2 +setup.md +basics.md +case-studies.md ``` \ No newline at end of file diff --git a/notebooks/linear_fitting.ipynb b/linear_fitting.ipynb similarity index 100% rename from notebooks/linear_fitting.ipynb rename to linear_fitting.ipynb diff --git a/notebooks/pandas.ipynb b/pandas.ipynb similarity index 100% rename from notebooks/pandas.ipynb rename to pandas.ipynb diff --git a/notebooks/periodic_data_processed.csv b/periodic_data_processed.csv similarity index 100% rename from notebooks/periodic_data_processed.csv rename to periodic_data_processed.csv diff --git a/notebooks/python-basics.ipynb b/python-basics.ipynb similarity index 100% rename from notebooks/python-basics.ipynb rename to python-basics.ipynb diff --git a/setup.md b/setup.md new file mode 100644 index 0000000..ba7f3f2 --- /dev/null +++ b/setup.md @@ -0,0 +1,75 @@ +# Set Up + +## Running Python in the Cloud + +If you would just like to try out these notebooks to see if Python is right for you, we recommend running the notebooks in the cloud using GitHub Codespaces. + +To use GitHub Codespaces, you will need a GitHub account. If you do not have one, you can create one for free at [github.com](https://github.com). + +Next, click the following button to open the notebooks in GitHub Codespaces: + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MolSSI-Education/python-experimental-chem?editor=jupyter) + +This will take a few minutes to start up. +By default, the Codespace will open in an interface called VSCode. +However, we recommend using the Jupyter Lab interface. +To use this interface, click [this link](https://github.com/codespaces) to see your Codespaces. +GitHub will have given your CodeSpace a random name. +Click the buttons with three dots to the right of your CodeSpace and select "Open with Jupyter Lab". + +![jupyter-lab](./images/open-in-jupyterlab.png) + +## Installing Python Locally + +If you would like to install Python and run these notebooks on your own computer, we reccomend the following: + + +1. [Download and install miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html) - Miniconda is a package manager that will allow you to install Python and other software needed for this workshop. If you already have conda installed, you can skip this step. + +2. Install solver - We recommend changing a setting having to do with how packages are installed. After you have the conda package manager installed, open your terminal (if on Mac or Linux) or the Anaconda Prompt (if on Windows). + +Note, if you have previously installed conda, you will first need to do the following in your terminal: + +```bash +conda update -n base conda +``` +Then, execute the following command + +```bash +conda install -n base conda-libmamba-solver -c conda-forge +``` + +Then run this command + +```bash +conda config --set solver libmamba +``` + +3. Clone or download the files for the workshop from the GitHub reposistory. + +```bash +git clone https://github.com/MolSSI-Education/python-experimental-chem.git +``` + +4. Install the environment for the workshop +Once you've cloned the workshop materials, you can create an environment with all the necessary packages by navigating to the workshop directory and running the following command: + +```bash +conda env create -f environment.yml +``` + +5. Test your installation + +You can test your installation by activating the environment and opening the jupyter lab interface. + +Type the following to activate your environment + +```bash +conda activate sermacs-workshop +``` + +Type the following to open a Jupyter Lab interface: + +```bash +jupyter lab +``` diff --git a/notebooks/si_data/N0125701.asc b/si_data/N0125701.asc similarity index 100% rename from notebooks/si_data/N0125701.asc rename to si_data/N0125701.asc diff --git a/notebooks/si_data/N0125702.asc b/si_data/N0125702.asc similarity index 100% rename from notebooks/si_data/N0125702.asc rename to si_data/N0125702.asc diff --git a/notebooks/si_data/N0125703.asc b/si_data/N0125703.asc similarity index 100% rename from notebooks/si_data/N0125703.asc rename to si_data/N0125703.asc diff --git a/notebooks/si_data/N0125704.asc b/si_data/N0125704.asc similarity index 100% rename from notebooks/si_data/N0125704.asc rename to si_data/N0125704.asc diff --git a/notebooks/si_data/README.md b/si_data/README.md similarity index 100% rename from notebooks/si_data/README.md rename to si_data/README.md diff --git a/notebooks/visualization.ipynb b/visualization.ipynb similarity index 100% rename from notebooks/visualization.ipynb rename to visualization.ipynb diff --git a/notebooks/xps_processing.ipynb b/xps_processing.ipynb similarity index 98% rename from notebooks/xps_processing.ipynb rename to xps_processing.ipynb index c3d40a0..a3aca7e 100644 --- a/notebooks/xps_processing.ipynb +++ b/xps_processing.ipynb @@ -379,17 +379,6 @@ "" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "2aa3816a-5d48-41a4-88a1-adba7d9c55b2", - "metadata": {}, - "outputs": [], - "source": [ - "# Add your label for oxygen here.\n", - "\n" - ] - }, { "cell_type": "markdown", "id": "edd39b5d-1e19-42b6-a230-9e6429f22514", @@ -633,7 +622,7 @@ "id": "241e5c0b-65ae-490b-a2df-01a09c0367b3", "metadata": {}, "source": [ - "## Numerical Integration of Peaks\n", + "### Numerical Integration of Peaks\n", "\n", "Although it is possible to fit a function to each peak and perform integration,\n", "we can also analyze our spectrum by doing numerical integration.\n", @@ -736,7 +725,7 @@ "id": "d9007712-db67-4251-b675-dfba9a5dd677", "metadata": {}, "source": [ - "## Fitting Peaks with Gaussian Functions\n", + "### Fitting Peaks with Gaussian Functions\n", "\n", "The following is supplemental material. \n", "If you would like to be more rigorous with your peak fitting, you might choose to fit the peaks with a Gaussian instead of performing numerical integration.\n", @@ -896,7 +885,7 @@ "id": "17046b5b-797c-4380-b8e3-2528b1863e67", "metadata": {}, "source": [ - "## Peak Integration\n", + "### Peak Integration\n", "\n", "Now that we have our peak, we can integrate it using SciPy.\n", "We will use [the `quad` function](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html) we imported at the top of the file.\n",