Skip to content

Commit

Permalink
move files, add instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
janash committed Nov 2, 2023
1 parent 84cb3f1 commit 8ca93ae
Show file tree
Hide file tree
Showing 30 changed files with 103 additions and 23 deletions.
8 changes: 8 additions & 0 deletions basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Python Basics

```{toctree} Table of Contents
python-basics.ipynb
pandas.ipynb
visualization.ipynb
```
7 changes: 7 additions & 0 deletions case-studies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Case Studies

```{toctree} Table of Contents
linear_fitting.ipynb
xps_processing.ipynb
```
7 changes: 5 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# -- Project information -----------------------------------------------------

project = 'python-scripting-chemists'
project = 'python-scripting-experimental'
copyright = ("2023, The Molecular Sciences Software Institute")
author = 'Jessica Nash'

Expand Down Expand Up @@ -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",
},
Expand All @@ -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".
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Binary file added images/open-in-jupyterlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
12 changes: 5 additions & 7 deletions index.md
Original file line number Diff line number Diff line change
@@ -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
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
75 changes: 75 additions & 0 deletions setup.md
Original file line number Diff line number Diff line change
@@ -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
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 3 additions & 14 deletions notebooks/xps_processing.ipynb → xps_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,6 @@
"</div>"
]
},
{
"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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 8ca93ae

Please sign in to comment.