From 12cfc538e7574291c89551eadf8b0026bcce6346 Mon Sep 17 00:00:00 2001 From: wexlergroup Date: Thu, 5 Sep 2024 23:30:32 -0500 Subject: [PATCH] Update documentation --- _sources/lecture-03-control.md | 32 ++++++++++++++++++++++++++++++-- lecture-03-control.html | 31 +++++++++++++++++++++++++++++-- searchindex.js | 2 +- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/_sources/lecture-03-control.md b/_sources/lecture-03-control.md index 16f65f6..389bd38 100644 --- a/_sources/lecture-03-control.md +++ b/_sources/lecture-03-control.md @@ -190,6 +190,13 @@ This loop prints each character in the string `"hello"` on a new line. #### Looping Through a Dictionary +````{margin} +```{admonition} Lists vs. Dictionaries +- **Lists** (`[]`): Ordered collections of items. Access elements by their position (index), e.g., `my_list[0]`. +- **Dictionaries** (`{}`): Unordered collections of key-value pairs. Access elements by their key, e.g., `my_dict['key']`. Keys must be unique. +``` +```` + Dictionaries are collections of key-value pairs, and you can loop through both the keys and values: ```{code-cell} ipython3 @@ -232,6 +239,11 @@ for index, row in df.iterrows(): Here, the loop iterates over each row in the DataFrame `df`, printing the index, name, and age for each row. +```{admonition} Note +:class: note +When we use syntax like `df.iterrows()`, we're calling a **method** of the DataFrame object `df`. A method is like a function but is tied to an object (in this case, the DataFrame). The dot notation (`df.method_name()`) is used to call methods that perform specific actions on the object. So, `iterrows()` is a method of a DataFrame that returns an iterator over its rows, allowing you to loop through each row. +``` + #### List Comprehensions List comprehensions provide a concise way to create lists by applying an expression to each element in an existing iterable. This is an elegant and Pythonic way to create new lists from existing data. @@ -249,7 +261,7 @@ squares = [x**2 for x in range(5)] print(squares) ``` -In this example, the list comprehension `[x**2 for x in range(5)]` creates a new list `squares` by squaring each element in the range from `0` to `4`. +In this example, the list comprehension `[x**2 for x in range(5)]` creates a new list object, which is then assigned to the variable `squares`, containing the squares of each element in the range from `0` to `4`. ### 2.2 The `while` Loop @@ -283,6 +295,15 @@ while i < 5: In this example, the variable `i` is initialized to `0`. The `while` loop executes the block of code repeatedly, printing the value of `i` and then incrementing `i` by `1` on each iteration, until `i` reaches `5`. +```{admonition} Exercise +:class: tip +1. **What happens if you move `i = 0` inside the `while` loop block?** + Try moving the line `i = 0` inside the `while` loop. What do you expect will happen, and why? + +2. **What happens if you forget to include `i += 1` inside the loop?** + What do you think will occur if you remove the line `i += 1` from the loop? Explain your reasoning and try running the code to see what happens. +``` + --- ## Section 3: Functions @@ -352,10 +373,17 @@ print(result) Here, we define a lambda function `add` that takes two arguments, `x` and `y`, and returns their sum. The lambda function behaves like a regular function but is written in a more compact form. +**Note:** `add` refers to the function itself, while `add(3, 5)` refers to the result of calling the function with the arguments `3` and `5`. In this case, `add(3, 5)` evaluates to `8`. + ### 3.4 Using Lambda Functions with Higher-Order Functions Lambda functions are frequently used as arguments to higher-order functions like `map()`, `filter()`, and `reduce()` because of their concise syntax. +**Syntax of `map()`:** +`map(function, iterable)` + +Here, `function` is the operation to apply, and `iterable` is the collection of items that the function will be applied to. + **Example with `map()`:** ```{code-cell} ipython3 @@ -500,4 +528,4 @@ If you're looking to challenge yourself further, here are a few more exercises t --- -Feel free to explore these exercises further, and don’t hesitate to experiment with your own ideas. The more you practice, the more confident you’ll become in your Python programming skills. Good luck! +Feel free to explore these exercises further, and don’t hesitate to experiment with your own ideas. If you have any questions or need clarification, feel free to discuss them in the Slack channel. The more you practice, the more confident you’ll become in your Python programming skills. Good luck! diff --git a/lecture-03-control.html b/lecture-03-control.html index 2a0400b..744e1b4 100644 --- a/lecture-03-control.html +++ b/lecture-03-control.html @@ -659,6 +659,16 @@

Looping Through a String

Looping Through a Dictionary#

+

Dictionaries are collections of key-value pairs, and you can loop through both the keys and values:

In this example, the variable i is initialized to 0. The while loop executes the block of code repeatedly, printing the value of i and then incrementing i by 1 on each iteration, until i reaches 5.

+
+

Exercise

+
    +
  1. What happens if you move i = 0 inside the while loop block?
    +Try moving the line i = 0 inside the while loop. What do you expect will happen, and why?

  2. +
  3. What happens if you forget to include i += 1 inside the loop?
    +What do you think will occur if you remove the line i += 1 from the loop? Explain your reasoning and try running the code to see what happens.

  4. +
+

@@ -879,10 +902,14 @@

3.3 Lambda Functionsadd that takes two arguments, x and y, and returns their sum. The lambda function behaves like a regular function but is written in a more compact form.

+

Note: add refers to the function itself, while add(3, 5) refers to the result of calling the function with the arguments 3 and 5. In this case, add(3, 5) evaluates to 8.

3.4 Using Lambda Functions with Higher-Order Functions#

Lambda functions are frequently used as arguments to higher-order functions like map(), filter(), and reduce() because of their concise syntax.

+

Syntax of map():
+map(function, iterable)

+

Here, function is the operation to apply, and iterable is the collection of items that the function will be applied to.

Example with map():

diff --git a/searchindex.js b/searchindex.js index 3a7740f..e654739 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"": [[1, null], [1, null], [2, null], [2, null], [2, null], [3, null]], "1.1 Download and Install Python": [[1, "download-and-install-python"]], "1.1 Key Features of NumPy": [[2, "key-features-of-numpy"]], "1.1 The if Statement": [[3, "the-if-statement"]], "1.2 Check if Python is Already Installed": [[1, "check-if-python-is-already-installed"]], "1.2 The if-else Statement": [[3, "the-if-else-statement"]], "1.2 Working with NumPy Arrays": [[2, "working-with-numpy-arrays"]], "1.3 Practice Exercises": [[2, "practice-exercises"]], "1.3 The if-elif-else Statement": [[3, "the-if-elif-else-statement"]], "1.3 Windows-Specific Note": [[1, "windows-specific-note"]], "2.1 Install Jupyter Notebook": [[1, "install-jupyter-notebook"]], "2.1 Key Features of SciPy": [[2, "key-features-of-scipy"]], "2.1 The for Loop": [[3, "the-for-loop"]], "2.2 Launching Jupyter Notebook": [[1, "launching-jupyter-notebook"]], "2.2 The while Loop": [[3, "the-while-loop"]], "3.1 Defining Functions": [[3, "defining-functions"]], "3.1 Key Features of Matplotlib": [[2, "key-features-of-matplotlib"]], "3.1 Python and Mathematics": [[1, "python-and-mathematics"]], "3.2 Creating Basic Plots with Matplotlib": [[2, "creating-basic-plots-with-matplotlib"]], "3.2 Functions with Default Parameter Values": [[3, "functions-with-default-parameter-values"]], "3.2 Practice Exercises": [[1, "practice-exercises"]], "3.3 Customizing Your Plots": [[2, "customizing-your-plots"]], "3.3 Lambda Functions": [[3, "lambda-functions"]], "3.3 Python Can Do Chemistry": [[1, "python-can-do-chemistry"]], "3.4 Practice Exercises": [[1, "id1"], [2, "id1"]], "3.4 Using Lambda Functions with Higher-Order Functions": [[3, "using-lambda-functions-with-higher-order-functions"]], "3.5 Python Can Do Graphing": [[1, "python-can-do-graphing"]], "3.5 Using Lambda Functions with Pandas": [[3, "using-lambda-functions-with-pandas"]], "3.6 Best Practices for Using Functions": [[3, "best-practices-for-using-functions"]], "3.6 Practice Exercises": [[1, "id2"]], "3.7 Python Can Do More": [[1, "python-can-do-more"]], "4.1 Key Features of Pandas": [[2, "key-features-of-pandas"]], "4.2 Series: The 1D Data Structure": [[2, "series-the-1d-data-structure"]], "4.3 DataFrame: The 2D Data Structure": [[2, "dataframe-the-2d-data-structure"]], "4.4 Reading and Writing Data": [[2, "reading-and-writing-data"]], "4.5 Filtering Data": [[2, "filtering-data"]], "4.6 Practice Exercises": [[2, "id2"]], "Additional Exercises": [[3, "additional-exercises"]], "Advanced Matrix Operations": [[2, "advanced-matrix-operations"]], "Best Practice": [[2, null]], "Creating and Using Arrays": [[2, "creating-and-using-arrays"]], "Exercise 1": [[3, null]], "Exercise 1: Check if a Number is Even or Odd": [[3, "exercise-1-check-if-a-number-is-even-or-odd"]], "Exercise 2": [[3, null]], "Exercise 2: Sum of All Numbers in a List": [[3, "exercise-2-sum-of-all-numbers-in-a-list"]], "Exercise 3": [[3, null]], "Exercise 3: Factorial of a Number": [[3, "exercise-3-factorial-of-a-number"]], "Exercise 4": [[3, null]], "Exercise 4: Check if a String is a Palindrome": [[3, "exercise-4-check-if-a-string-is-a-palindrome"]], "Exercise 5": [[3, null]], "Exercise 5: Find the Maximum and Minimum Elements in a List": [[3, "exercise-5-find-the-maximum-and-minimum-elements-in-a-list"]], "Generating Arrays with Specific Properties": [[2, "generating-arrays-with-specific-properties"]], "Histograms": [[2, "histograms"]], "Important": [[2, null]], "Infinite Loops": [[3, null]], "Installing NumPy": [[2, "installing-numpy"]], "Introduction": [[3, "introduction"]], "Key Control Structures in Python": [[3, "key-control-structures-in-python"]], "Learning Objectives": [[1, "learning-objectives"], [2, "learning-objectives"], [3, "learning-objectives"]], "Lecture 1: Introduction to Python for the Chemical Sciences": [[1, null]], "Lecture 2: Essential Python Packages for the Chemical Sciences": [[2, null]], "Lecture 3: Control Structures in Python": [[3, null]], "Line Plots": [[2, "line-plots"]], "List Comprehensions": [[3, "list-comprehensions"]], "Looping Through a Dictionary": [[3, "looping-through-a-dictionary"]], "Looping Through a List": [[3, "looping-through-a-list"]], "Looping Through a NumPy Array": [[3, "looping-through-a-numpy-array"]], "Looping Through a Pandas DataFrame": [[3, "looping-through-a-pandas-dataframe"]], "Looping Through a String": [[3, "looping-through-a-string"]], "Matrix and Vector Operations": [[2, "matrix-and-vector-operations"]], "Python Lists": [[2, null]], "Reminder": [[2, null]], "Scatter Plots": [[2, "scatter-plots"]], "Section 1: Conditional Statements": [[3, "section-1-conditional-statements"]], "Section 1: NumPy - The Foundation of Scientific Computing in Python": [[2, "section-1-numpy-the-foundation-of-scientific-computing-in-python"]], "Section 2: Loops": [[3, "section-2-loops"]], "Section 2: SciPy - A Powerful Tool for Scientific Computing": [[2, "section-2-scipy-a-powerful-tool-for-scientific-computing"]], "Section 3: Functions": [[3, "section-3-functions"]], "Section 3: Matplotlib - Creating Publication-Quality Visualizations": [[2, "section-3-matplotlib-creating-publication-quality-visualizations"]], "Section 4: Hands-on Practice": [[3, "section-4-hands-on-practice"]], "Section 4: Pandas - Powerful Data Manipulation in Python": [[2, "section-4-pandas-powerful-data-manipulation-in-python"]], "Step 1: Getting Python Installed": [[1, "step-1-getting-python-installed"]], "Step 2: Installing Jupyter Notebook": [[1, "step-2-installing-jupyter-notebook"]], "Step 3: Let\u2019s Get Started with Python": [[1, "step-3-let-s-get-started-with-python"]], "Welcome to Computational Problem Solving in the Chemical Sciences": [[0, null]], "What Are Control Structures?": [[3, "what-are-control-structures"]]}, "docnames": ["intro", "lecture-01-introduction", "lecture-02-packages", "lecture-03-control"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinxcontrib.bibtex": 9}, "filenames": ["intro.md", "lecture-01-introduction.md", "lecture-02-packages.md", "lecture-03-control.md"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [2, 3], "0": [1, 2, 3], "00": [1, 2], "0000000000000004": 2, "008": 1, "01": 1, "010999999999996": 1, "011": 1, "040756": [], "042757": [], "044403": [], "044783": [], "049373": 2, "051520": [], "067183": [], "07069651": [], "071614": [], "073500": [], "074532": [], "07812993": [], "0783716": [], "08": 2, "08468586": [], "090967": [], "09188008": [], "092201": [], "1": 0, "10": [1, 2, 3], "100": [1, 2], "1000": 2, "102174": [], "11": 2, "113959": [], "11574968": [], "12": 1, "12138546": [], "1225": 3, "12357159": [], "127797": [], "128745": [], "130": 2, "137451": [], "14159": 3, "15": 2, "150": 2, "151212": [], "153355": [], "15383974": [], "154": 2, "15763222": [], "16": [1, 2, 3], "166290": [], "169374": [], "17855413": [], "183777": [], "19971276": [], "2": 0, "20": [], "21459876": [], "21514317": [], "22": [], "220619": [], "22466308": [], "22722108611679165": 1, "23": [], "230942": [], "234381": [], "24": 2, "246372": [], "25": [1, 2, 3], "25097623": [], "253167": [], "254594": [], "25685736": [], "264": 2, "264261": [], "265": 2, "270435": [], "273713": [], "282552": [], "288791": [], "291939": [], "29260813": [], "295068": [], "296185": [], "29978765": [], "2x2": 2, "3": 0, "30": [2, 3], "31016631": [], "318526": 2, "32": 2, "32099643": [], "324007": [], "327": 2, "33026915": [], "3442733": [], "34714337": 2, "35": [2, 3], "350110": [], "36330421": [], "37": 2, "37228132": 2, "373919": [], "39": 2, "391991": 2, "3d": [1, 2], "3x3": 2, "410": 2, "41152632": 2, "41263254": [], "415782": [], "419523": [], "42": 2, "422": 2, "4256142": [], "42638864": [], "429932": [], "430490": [], "435078": [], "435593": 2, "43765552": [], "44": 1, "440513": [], "453202": [], "45398804": [], "460471": [], "468024": [], "47036559": [], "480066": [], "482436": 2, "490528": [], "492423": 2, "49731891": [], "498755": [], "50": 2, "526100": [], "526245": [], "52695194": [], "53": [], "530054": [], "53651539": 2, "545158": [], "555261": 2, "558357": [], "562114": [], "563880": 2, "569610": [], "57": 2, "57219658": [], "575324": [], "582797": [], "5998763": 2, "60": 2, "603": 2, "618404": [], "625": 3, "63": 2, "640340": [], "64181731": [], "64448507": [], "645725": 2, "649707": [], "65": 2, "653721": 2, "65437021": 2, "66805603": [], "670": 2, "67897942": 2, "684116": [], "697682": [], "7": [2, 3], "70292167": [], "703219": [], "70360658": [], "712417": [], "71856743": [], "722833": [], "723356": [], "72436375": [], "73": 2, "733507": 2, "734481": [], "736878": [], "74": 2, "74366638": [], "746566": [], "74807732": [], "75": 2, "763835": [], "76910543": [], "77": 2, "78083219": [], "780922": 2, "78252123": [], "790745": [], "8": [1, 3], "804": 2, "81": 2, "813318": 2, "82": 2, "821785": [], "823132": [], "831357": [], "83257677": [], "840": 2, "841431": 2, "843290": [], "85": 2, "851055": [], "852": 2, "858194": [], "86": 2, "86599082": 2, "87": 2, "872680": [], "879550": [], "88": 2, "884707": [], "88586208": [], "888187": [], "88821188": [], "89": 2, "9": [1, 2, 3], "90": 2, "900": 3, "903735": 2, "913378": [], "919537": [], "922371": [], "923769": [], "92578833": [], "928158": [], "931484": [], "934": 2, "94128165": [], "94459246": [], "95143119": 2, "954706": 2, "957231": [], "96641313": [], "966945": [], "A": [1, 3], "AND": 2, "And": [1, 2], "As": [1, 2], "By": [1, 2, 3], "For": [1, 2], "If": [1, 2, 3], "In": [1, 2, 3], "It": [2, 3], "NOT": 2, "OR": 2, "One": 2, "The": 1, "These": [1, 2, 3], "To": [1, 3], "With": [1, 2], "_2": 1, "abil": 2, "abl": [1, 2, 3], "about": 3, "abov": [1, 2], "academ": 1, "access": [1, 2], "accordingli": 3, "accumul": 3, "achiev": 1, "across": [1, 2, 3], "actinium": 2, "action": 3, "ad": [2, 3], "add": [1, 2, 3], "addit": 1, "addition": 1, "advanc": 1, "after": 1, "ag": 3, "age_squar": 3, "aggreg": 2, "algebra": 2, "alia": 1, "alic": 3, "all": 1, "allow": [1, 2, 3], "along": 2, "also": [1, 2, 3], "altern": 3, "aluminum": 2, "alwai": [2, 3], "americium": 2, "an": [1, 2, 3], "analys": 1, "analysi": [1, 2], "analyz": [1, 2], "anatomi": 2, "ani": [1, 2, 3], "anim": 2, "annot": 2, "anonym": 3, "antimoni": 2, "appear": 1, "appl": 3, "appli": [1, 2, 3], "applic": [1, 2], "approach": 3, "approxim": 1, "ar": [1, 2], "area": [1, 2, 3], "argon": 2, "argument": 3, "arithmet": 1, "around": 1, "arr": 3, "arrai": 1, "ase": 1, "aspect": [2, 3], "atom": [1, 2], "atomist": 1, "attract": 1, "autom": 1, "automat": 1, "avail": [1, 2], "avoid": 3, "awesom": 1, "ax": 2, "axi": 1, "b": [1, 2], "back": 3, "backward": 3, "banana": 3, "bar": [1, 2], "base": [2, 3], "basic": [1, 3], "becaus": 3, "becom": [2, 3], "befor": [1, 2, 3], "behav": 3, "being": 2, "below": 3, "best": 1, "better": 2, "between": [1, 2], "beyond": [1, 2], "bin": 2, "biologi": 1, "black": 2, "block": 3, "blue": 2, "bob": 3, "bond": 2, "both": [1, 2, 3], "box": 1, "bracket": 2, "bread": 2, "break": 3, "bring": 1, "broadcast": 2, "browser": 1, "build": [2, 3], "built": [1, 2, 3], "butter": 2, "c": [1, 2], "calcul": [1, 2, 3], "calculate_area": 3, "calculu": 1, "call": 3, "caller": 3, "can": [2, 3], "cantera": 1, "capabl": [1, 2], "carbon": 1, "carbon_mass": 1, "carlo": 1, "case": 1, "cater": 2, "caus": 3, "certain": 3, "cesium": 2, "challeng": [1, 3], "chang": 2, "char": 3, "charact": 3, "charli": 3, "chart": 2, "check": 2, "chemistri": 2, "cherri": 3, "circl": 3, "circular": 2, "citi": 3, "class": 2, "clean": 2, "clearli": 3, "co": 1, "code": [1, 2, 3], "cohes": 2, "collect": [2, 3], "color": [1, 2], "column": [2, 3], "combin": 3, "come": 1, "command": [1, 2], "comment": 2, "common": [2, 3], "commonli": [1, 2, 3], "commun": [], "comp": [], "compact": 3, "compar": 3, "complex": [1, 2, 3], "compon": [2, 3], "compound": 1, "comprehens": 2, "comput": [1, 3], "concept": 3, "concis": 3, "conclud": [1, 2], "condit": 2, "condition1": 3, "condition2": 3, "confid": [2, 3], "confirm": 2, "consid": 3, "constant": 1, "constitu": 2, "contain": [1, 2], "continu": [1, 3], "contourpi": [], "control": 0, "conveni": 2, "convert": 3, "core": [2, 3], "cornerston": 2, "correspond": 3, "count": 3, "coupl": 1, "cours": [1, 2], "cover": [1, 2, 3], "creat": [1, 3], "criteria": 2, "critic": 2, "crucial": [1, 3], "csv": 2, "cycler": [], "dash": 2, "data": [1, 3], "databas": 2, "dataset": [2, 3], "dateutil": [], "decis": 3, "decompos": 2, "deepen": 1, "deepli": 2, "def": 3, "default": [1, 2], "definit": 2, "delv": 2, "demonstr": [1, 2], "depend": 3, "describ": 3, "descript": 3, "design": [1, 2, 3], "det": 2, "detail": [1, 2], "determin": [1, 2], "develop": 2, "df": [2, 3], "dictat": 3, "dictionari": 2, "differ": [1, 2, 3], "differenti": [1, 2], "dimension": 2, "dioxid": 1, "directli": [1, 2], "displai": [1, 2], "dispos": 1, "distanc": 2, "distribut": 2, "dive": 1, "divers": 1, "divis": [1, 3], "do": 3, "docstr": 3, "document": [1, 2, 3], "doe": 3, "doesn": 1, "don": [1, 2, 3], "dot": 2, "dot_product": 2, "download": 2, "dtype": 2, "duplic": 3, "dure": 1, "dynam": [1, 3], "e": [2, 3], "each": [1, 2, 3], "eas": [1, 2], "easi": 2, "easier": [2, 3], "easili": [1, 2, 3], "ecosystem": 2, "edgecolor": 2, "effect": [], "effici": [2, 3], "eigenvalu": 2, "eigval": 2, "either": 3, "electron": 1, "eleg": [2, 3], "element": 2, "elsewher": 3, "emploi": 1, "enabl": [2, 3], "encapsul": 3, "encount": [1, 2], "end": [1, 2, 3], "energi": 2, "engin": [1, 2], "enhanc": 1, "ensur": [1, 2, 3], "env": [], "environ": [1, 2], "equal": [2, 3], "equat": [1, 2], "equilibria": 2, "equip": 1, "error": 1, "especi": [2, 3], "essenti": [0, 3], "ev": 2, "evalu": 3, "eventu": 3, "everi": 2, "exampl": [1, 2, 3], "excel": [1, 2], "execut": 3, "exist": 3, "expand": 3, "experi": [1, 3], "explain": [2, 3], "explor": [1, 2, 3], "exponenti": 1, "express": [1, 3], "extend": [1, 2], "extens": 2, "ey": 2, "f": 2, "facilit": 3, "fall": 2, "fals": [2, 3], "far": [1, 2], "feel": 3, "few": [2, 3], "fibonacci": 3, "field": 2, "figur": 2, "file": 2, "fill": 2, "filter": 3, "filtered_df": 2, "final": 1, "find": [1, 2], "first": [1, 2, 3], "fit": 1, "flexibl": [2, 3], "float": [1, 2, 3], "float64": 2, "flow": 3, "fluorin": 2, "focu": [1, 2], "focus": 3, "follow": [1, 2, 3], "fonttool": [], "forget": 2, "form": 3, "format": [1, 2], "forward": [1, 3], "foundat": 1, "fourier": 2, "free": 3, "frequenc": 2, "frequent": [1, 2, 3], "from": [1, 2, 3], "fruit": 3, "full": 2, "function": [1, 2], "function_nam": 3, "fundament": [1, 2, 3], "further": 3, "g": [2, 3], "gain": [1, 2], "gener": 3, "genom": 1, "get": 3, "give": [1, 3], "given": 3, "glimps": 1, "go": 1, "good": 3, "googl": 1, "gram": 1, "graphic": [1, 2], "great": 1, "greater": [2, 3], "greet": 3, "grid": 2, "group": 2, "guid": 3, "h": [1, 3], "ha": [1, 2, 3], "hamiltonian": 2, "handl": [1, 2, 3], "have": [1, 2, 3], "heavili": 2, "hello": 3, "help": [1, 2, 3], "here": [1, 2, 3], "hesit": [1, 3], "higher": 2, "highli": [1, 2], "hint": [1, 2, 3], "hist": 2, "hold": [1, 2], "how": [1, 2, 3], "howev": 2, "hydrogen": 1, "i": 2, "idea": 3, "ideal": [1, 2], "ident": 2, "imag": 2, "import": [1, 3], "includ": [1, 2, 3], "incredibli": [2, 3], "increment": 3, "indefinit": 3, "index": [2, 3], "indispens": 2, "individu": 3, "industri": 1, "infinit": 2, "inform": [1, 2], "initi": 3, "input": [2, 3], "insid": 3, "insight": 2, "instanc": 1, "instruct": [1, 3], "integ": 2, "integr": 2, "interact": [1, 2], "interfac": 1, "interpol": 2, "interv": 2, "introduct": 0, "inv": 2, "invalu": [1, 2], "invers": 2, "item": [2, 3], "iter": 3, "iterrow": 3, "its": [1, 2, 3], "journei": 1, "julia": 1, "jupyt": 2, "just": [1, 2, 3], "keep": 3, "kei": 1, "keyword": 3, "kind": 1, "kinet": 1, "kiwisolv": [], "kj": 2, "knowledg": 3, "l": 3, "label": [1, 2], "languag": 1, "larg": [2, 3], "last": 3, "later": 1, "latest": 1, "latex": 1, "lectur": 0, "legend": [1, 2], "less": 3, "let": 2, "leverag": 2, "lib": [], "librari": [1, 2], "like": [1, 2, 3], "linalg": 2, "line": [1, 3], "linear": 2, "linestyl": 2, "linspac": 2, "linux": 1, "list": [], "littl": 3, "live": 1, "ll": [1, 2, 3], "load": 2, "logic": 2, "long": 3, "look": 3, "luck": 3, "m": [1, 2], "m_inv": 2, "mac": 1, "machin": 1, "magnet": 2, "main": 3, "maintain": [2, 3], "major": 1, "make": [1, 2, 3], "mani": [1, 2], "manipul": 1, "manner": 2, "map": 3, "marker": 2, "mass": 1, "master": 1, "materi": 1, "math": 1, "mathemat": 2, "mathematica": 1, "matlab": 1, "matplotlib": 1, "matric": 2, "matter": 1, "max": 3, "maximum": 2, "mean": [1, 2], "mechan": 2, "meet": 2, "mercuri": 2, "merg": [2, 3], "messag": 3, "met": 3, "method": [2, 3], "might": 1, "min": 3, "miniconda3": [], "minimum": 2, "model": 1, "modern": 1, "modifi": [1, 2], "modul": [1, 2], "modular": 3, "modulo": 3, "mol": 2, "molar": 1, "molar_mass": 1, "mole": [1, 2], "molecular": [1, 2], "mont": 1, "more": [2, 3], "most": [2, 3], "move": 1, "much": [1, 2], "multi": 2, "multipl": [1, 2, 3], "multipli": [2, 3], "must": 1, "my_list": 2, "n": [2, 3], "name": [1, 2, 3], "narr": 1, "ndarrai": 2, "need": [1, 2, 3], "never": 3, "new": [1, 3], "new_list": 3, "next": [1, 3], "none": 3, "notebook": 2, "now": [1, 3], "np": [2, 3], "number": [1, 2], "numer": [1, 2, 3], "numpi": 1, "o": [1, 2, 3], "occur": 3, "offer": [1, 2], "offici": [1, 2], "often": [1, 3], "old_list": 3, "onc": [1, 2], "one": [1, 2, 3], "ones": 2, "onli": [1, 2, 3], "open": 1, "oper": [1, 3], "opportun": 2, "optim": 2, "option": 3, "order": 2, "organ": [1, 2, 3], "orient": 2, "origin": [1, 3], "orthonorm": 2, "other": [1, 2, 3], "otherwis": 3, "our": [1, 2], "out": [1, 2], "output": 2, "over": [2, 3], "overlap": 2, "overleaf": 1, "overview": 2, "own": [1, 3], "oxygen": 1, "oxygen_mass": 1, "p": 2, "packag": [0, 1], "pair": 3, "panda": 1, "paramet": 2, "parenthes": [2, 3], "part": 1, "particularli": [1, 2, 3], "path": 1, "pd": [2, 3], "pdf": 2, "per": 2, "perform": [1, 2, 3], "period": 2, "person": 3, "physic": [1, 2], "pillow": [], "pip": [1, 2], "pip3": 1, "plai": 2, "plot": 1, "plotli": 1, "plt": [1, 2], "png": 2, "point": 2, "popular": 1, "posit": 2, "possibl": [1, 3], "potassium": 2, "power": [1, 3], "pre": 1, "predefin": 2, "predetermin": 3, "predict": 1, "prefix": 1, "prepar": 1, "present": [1, 2], "prevent": 2, "previou": 1, "primari": 2, "primarili": 1, "principl": 2, "print": [2, 3], "prob": [], "problem": [1, 2], "process": [1, 2, 3], "produc": 3, "product": 2, "program": [1, 3], "progress": [1, 2], "project": 1, "prompt": [1, 2], "properti": 1, "provid": [2, 3], "purpos": 2, "put": [1, 3], "pymatgen": 1, "pypars": [], "pyplot": [1, 2], "pyscf": 1, "python": 0, "python3": 1, "quacc": 1, "quantiti": 2, "quantum": [1, 2], "r": 1, "radiu": 3, "rand": 2, "randint": 2, "randn": 2, "random": 2, "rang": [1, 2, 3], "re": [1, 2, 3], "reach": 3, "reaction": [1, 2], "read": 3, "read_csv": 2, "readabl": 2, "readi": [1, 2], "real": 1, "recogn": 1, "recommend": [1, 2], "red": 2, "reduc": 3, "redund": 3, "refer": [1, 2], "reflect": 1, "regular": 3, "reinforc": 3, "relationship": 2, "reli": 2, "rememb": 1, "remov": 3, "render": 1, "repeat": 3, "repeatedli": 3, "repetit": 3, "report": 2, "repositori": 1, "repres": [1, 2], "requir": [2, 3], "research": 1, "resourc": 1, "respect": 1, "respond": 3, "respons": 3, "result": [1, 2, 3], "return": [2, 3], "reus": 3, "reusabl": 3, "revers": 3, "robust": 2, "role": 2, "root": [1, 2], "routin": 2, "row": [2, 3], "rubidium": 2, "run": [1, 2, 3], "sai": 1, "same": [1, 3], "satisfi": [], "save": 2, "scale": 1, "scatter": 1, "scatterplot": 2, "scientif": 1, "scikit": 1, "scipi": 1, "scratch": 2, "script": 2, "seaborn": 1, "second": 2, "see": 1, "seen": 1, "send": 3, "separ": 2, "sequenc": [2, 3], "sequenti": 3, "seri": 3, "serv": 2, "set": [1, 2, 3], "sever": 1, "shape": 2, "share": 1, "sheet": 1, "short": 3, "should": [1, 2, 3], "show": [1, 2, 3], "shown": 2, "signal": 2, "similar": 2, "simpl": [1, 2, 3], "simplest": 3, "simpli": 1, "simplifi": 2, "simul": 1, "sin": 2, "sine": 2, "singl": 2, "site": [], "six": [], "skill": [1, 2, 3], "skip": 3, "slice": 3, "small": 3, "smaller": 3, "so": 2, "softwar": [1, 2], "solid": [1, 2], "solut": 2, "solv": [1, 2], "some": [1, 2, 3], "sourc": 2, "special": 1, "specif": 3, "specifi": 3, "spectroscopi": 2, "spread": 2, "spreadsheet": [1, 2], "sql": 2, "sqrt": 1, "squar": [1, 2, 3], "start": [2, 3], "state": 2, "statement": 1, "static": 2, "statist": [1, 2], "statsmodel": 1, "steroid": 2, "stoichiometr": 1, "storag": 2, "store": [1, 2, 3], "straightforward": [1, 2, 3], "strength": [1, 2], "string": 2, "strong": 2, "structur": [0, 1], "style": [1, 2], "subset": 2, "subtract": 1, "suit": [1, 2], "support": [1, 2], "sure": 1, "svg": 2, "symbol": 1, "syntax": [1, 2, 3], "system": [1, 2], "t": [1, 2, 3], "tab": 1, "tabular": [1, 2, 3], "tackl": [1, 2], "tailor": 1, "take": 3, "task": [1, 2, 3], "technic": 2, "techniqu": [1, 2], "termin": [1, 2, 3], "test": 1, "text": 1, "than": [2, 3], "thei": [1, 2, 3], "them": [1, 2, 3], "thermodynam": 1, "thi": [1, 2, 3], "thing": 3, "think": 2, "those": 2, "three": 3, "through": [1, 2], "throughout": 2, "time": 3, "titl": [1, 2], "to_csv": 2, "todai": 1, "togeth": 3, "too": 3, "tool": 1, "toolkit": 2, "top": [1, 2], "topic": 2, "touch": 1, "tradit": 2, "transform": [2, 3], "transport": 1, "trend": 2, "true": [2, 3], "try": [1, 2], "tupl": 3, "twice": 1, "two": [1, 2, 3], "type": [1, 2, 3], "typic": 1, "u": 3, "ubiquit": 2, "underli": 2, "understand": [1, 2, 3], "unit": 2, "unlik": 3, "until": 3, "up": [1, 3], "upon": 1, "us": 1, "user": 1, "util": 3, "v": 2, "valu": [1, 2], "variabl": [1, 2, 3], "varieti": [1, 2], "variou": [1, 2], "vast": [1, 2], "ve": [1, 2, 3], "verifi": [1, 2], "versatil": [1, 2, 3], "version": 1, "visit": 1, "visual": 1, "vital": 2, "vowel": 3, "w": 2, "wai": [2, 3], "want": 2, "water": 1, "wavefunct": 2, "we": [1, 2, 3], "web": 1, "websit": 1, "welcom": 1, "well": 3, "wexler": [], "what": [1, 2], "when": [1, 2, 3], "where": 2, "whether": [1, 2, 3], "which": [1, 2, 3], "while": [1, 2], "wide": [1, 2], "wise": 2, "within": [1, 2, 3], "without": 3, "won": 2, "work": [1, 3], "workflow": 1, "workforc": 1, "world": 1, "write": 3, "written": [2, 3], "x": [1, 2, 3], "xenon": 2, "xlabel": [1, 2], "y": [1, 2, 3], "ylabel": [1, 2], "york": 3, "you": [1, 2, 3], "your": [1, 3], "yourself": [1, 3], "ytterbium": 2, "yttrium": 2, "zero": 2, "zinc": 2, "zirconium": 2}, "titles": ["Welcome to Computational Problem Solving in the Chemical Sciences", "Lecture 1: Introduction to Python for the Chemical Sciences", "Lecture 2: Essential Python Packages for the Chemical Sciences", "Lecture 3: Control Structures in Python"], "titleterms": {"": 1, "1": [1, 2, 3], "1d": 2, "2": [1, 2, 3], "2d": 2, "3": [1, 2, 3], "4": [1, 2, 3], "5": [1, 2, 3], "6": [1, 2, 3], "7": 1, "A": 2, "The": [2, 3], "addit": 3, "advanc": 2, "all": 3, "alreadi": 1, "ar": 3, "arrai": [2, 3], "basic": 2, "best": [2, 3], "can": 1, "check": [1, 3], "chemic": [0, 1, 2], "chemistri": 1, "comprehens": 3, "comput": [0, 2], "condit": 3, "control": 3, "creat": 2, "custom": 2, "data": 2, "datafram": [2, 3], "default": 3, "defin": 3, "dictionari": 3, "do": 1, "download": 1, "element": 3, "elif": 3, "els": 3, "essenti": 2, "even": 3, "exercis": [1, 2, 3], "factori": 3, "featur": 2, "filter": 2, "find": 3, "foundat": 2, "function": 3, "gener": 2, "get": 1, "graph": 1, "hand": 3, "higher": 3, "histogram": 2, "i": [1, 3], "import": 2, "infinit": 3, "instal": [1, 2], "introduct": [1, 3], "jupyt": 1, "kei": [2, 3], "lambda": 3, "launch": 1, "learn": [1, 2, 3], "lectur": [1, 2, 3], "let": 1, "line": 2, "list": [2, 3], "loop": 3, "manipul": 2, "mathemat": 1, "matplotlib": 2, "matrix": 2, "maximum": 3, "minimum": 3, "more": 1, "note": 1, "notebook": 1, "number": 3, "numpi": [2, 3], "object": [1, 2, 3], "odd": 3, "oper": 2, "order": 3, "packag": 2, "palindrom": 3, "panda": [2, 3], "paramet": 3, "plot": 2, "power": 2, "practic": [1, 2, 3], "problem": 0, "properti": 2, "public": 2, "python": [1, 2, 3], "qualiti": 2, "read": 2, "remind": 2, "scatter": 2, "scienc": [0, 1, 2], "scientif": 2, "scipi": 2, "section": [2, 3], "seri": 2, "solv": 0, "specif": [1, 2], "start": 1, "statement": 3, "step": 1, "string": 3, "structur": [2, 3], "sum": 3, "through": 3, "tool": 2, "us": [2, 3], "valu": 3, "vector": 2, "visual": 2, "welcom": 0, "what": 3, "while": 3, "window": 1, "work": 2, "write": 2, "your": 2}}) \ No newline at end of file +Search.setIndex({"alltitles": {"": [[1, null], [1, null], [2, null], [2, null], [2, null], [3, null], [3, null]], "1.1 Download and Install Python": [[1, "download-and-install-python"]], "1.1 Key Features of NumPy": [[2, "key-features-of-numpy"]], "1.1 The if Statement": [[3, "the-if-statement"]], "1.2 Check if Python is Already Installed": [[1, "check-if-python-is-already-installed"]], "1.2 The if-else Statement": [[3, "the-if-else-statement"]], "1.2 Working with NumPy Arrays": [[2, "working-with-numpy-arrays"]], "1.3 Practice Exercises": [[2, "practice-exercises"]], "1.3 The if-elif-else Statement": [[3, "the-if-elif-else-statement"]], "1.3 Windows-Specific Note": [[1, "windows-specific-note"]], "2.1 Install Jupyter Notebook": [[1, "install-jupyter-notebook"]], "2.1 Key Features of SciPy": [[2, "key-features-of-scipy"]], "2.1 The for Loop": [[3, "the-for-loop"]], "2.2 Launching Jupyter Notebook": [[1, "launching-jupyter-notebook"]], "2.2 The while Loop": [[3, "the-while-loop"]], "3.1 Defining Functions": [[3, "defining-functions"]], "3.1 Key Features of Matplotlib": [[2, "key-features-of-matplotlib"]], "3.1 Python and Mathematics": [[1, "python-and-mathematics"]], "3.2 Creating Basic Plots with Matplotlib": [[2, "creating-basic-plots-with-matplotlib"]], "3.2 Functions with Default Parameter Values": [[3, "functions-with-default-parameter-values"]], "3.2 Practice Exercises": [[1, "practice-exercises"]], "3.3 Customizing Your Plots": [[2, "customizing-your-plots"]], "3.3 Lambda Functions": [[3, "lambda-functions"]], "3.3 Python Can Do Chemistry": [[1, "python-can-do-chemistry"]], "3.4 Practice Exercises": [[1, "id1"], [2, "id1"]], "3.4 Using Lambda Functions with Higher-Order Functions": [[3, "using-lambda-functions-with-higher-order-functions"]], "3.5 Python Can Do Graphing": [[1, "python-can-do-graphing"]], "3.5 Using Lambda Functions with Pandas": [[3, "using-lambda-functions-with-pandas"]], "3.6 Best Practices for Using Functions": [[3, "best-practices-for-using-functions"]], "3.6 Practice Exercises": [[1, "id2"]], "3.7 Python Can Do More": [[1, "python-can-do-more"]], "4.1 Key Features of Pandas": [[2, "key-features-of-pandas"]], "4.2 Series: The 1D Data Structure": [[2, "series-the-1d-data-structure"]], "4.3 DataFrame: The 2D Data Structure": [[2, "dataframe-the-2d-data-structure"]], "4.4 Reading and Writing Data": [[2, "reading-and-writing-data"]], "4.5 Filtering Data": [[2, "filtering-data"]], "4.6 Practice Exercises": [[2, "id2"]], "Additional Exercises": [[3, "additional-exercises"]], "Advanced Matrix Operations": [[2, "advanced-matrix-operations"]], "Best Practice": [[2, null]], "Creating and Using Arrays": [[2, "creating-and-using-arrays"]], "Exercise": [[3, null]], "Exercise 1": [[3, null]], "Exercise 1: Check if a Number is Even or Odd": [[3, "exercise-1-check-if-a-number-is-even-or-odd"]], "Exercise 2": [[3, null]], "Exercise 2: Sum of All Numbers in a List": [[3, "exercise-2-sum-of-all-numbers-in-a-list"]], "Exercise 3": [[3, null]], "Exercise 3: Factorial of a Number": [[3, "exercise-3-factorial-of-a-number"]], "Exercise 4": [[3, null]], "Exercise 4: Check if a String is a Palindrome": [[3, "exercise-4-check-if-a-string-is-a-palindrome"]], "Exercise 5": [[3, null]], "Exercise 5: Find the Maximum and Minimum Elements in a List": [[3, "exercise-5-find-the-maximum-and-minimum-elements-in-a-list"]], "Generating Arrays with Specific Properties": [[2, "generating-arrays-with-specific-properties"]], "Histograms": [[2, "histograms"]], "Important": [[2, null]], "Infinite Loops": [[3, null]], "Installing NumPy": [[2, "installing-numpy"]], "Introduction": [[3, "introduction"]], "Key Control Structures in Python": [[3, "key-control-structures-in-python"]], "Learning Objectives": [[1, "learning-objectives"], [2, "learning-objectives"], [3, "learning-objectives"]], "Lecture 1: Introduction to Python for the Chemical Sciences": [[1, null]], "Lecture 2: Essential Python Packages for the Chemical Sciences": [[2, null]], "Lecture 3: Control Structures in Python": [[3, null]], "Line Plots": [[2, "line-plots"]], "List Comprehensions": [[3, "list-comprehensions"]], "Lists vs. Dictionaries": [[3, null]], "Looping Through a Dictionary": [[3, "looping-through-a-dictionary"]], "Looping Through a List": [[3, "looping-through-a-list"]], "Looping Through a NumPy Array": [[3, "looping-through-a-numpy-array"]], "Looping Through a Pandas DataFrame": [[3, "looping-through-a-pandas-dataframe"]], "Looping Through a String": [[3, "looping-through-a-string"]], "Matrix and Vector Operations": [[2, "matrix-and-vector-operations"]], "Note": [[3, null]], "Python Lists": [[2, null]], "Reminder": [[2, null]], "Scatter Plots": [[2, "scatter-plots"]], "Section 1: Conditional Statements": [[3, "section-1-conditional-statements"]], "Section 1: NumPy - The Foundation of Scientific Computing in Python": [[2, "section-1-numpy-the-foundation-of-scientific-computing-in-python"]], "Section 2: Loops": [[3, "section-2-loops"]], "Section 2: SciPy - A Powerful Tool for Scientific Computing": [[2, "section-2-scipy-a-powerful-tool-for-scientific-computing"]], "Section 3: Functions": [[3, "section-3-functions"]], "Section 3: Matplotlib - Creating Publication-Quality Visualizations": [[2, "section-3-matplotlib-creating-publication-quality-visualizations"]], "Section 4: Hands-on Practice": [[3, "section-4-hands-on-practice"]], "Section 4: Pandas - Powerful Data Manipulation in Python": [[2, "section-4-pandas-powerful-data-manipulation-in-python"]], "Step 1: Getting Python Installed": [[1, "step-1-getting-python-installed"]], "Step 2: Installing Jupyter Notebook": [[1, "step-2-installing-jupyter-notebook"]], "Step 3: Let\u2019s Get Started with Python": [[1, "step-3-let-s-get-started-with-python"]], "Welcome to Computational Problem Solving in the Chemical Sciences": [[0, null]], "What Are Control Structures?": [[3, "what-are-control-structures"]]}, "docnames": ["intro", "lecture-01-introduction", "lecture-02-packages", "lecture-03-control"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinxcontrib.bibtex": 9}, "filenames": ["intro.md", "lecture-01-introduction.md", "lecture-02-packages.md", "lecture-03-control.md"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [2, 3], "0": [1, 2, 3], "00": [1, 2], "0000000000000004": 2, "008": 1, "01": 1, "010999999999996": 1, "011": 1, "040756": [], "042757": [], "044403": [], "044783": [], "049373": 2, "051520": [], "067183": [], "07069651": [], "071614": [], "073500": [], "074532": [], "07812993": [], "0783716": [], "08": 2, "08468586": [], "090967": [], "09188008": [], "092201": [], "1": 0, "10": [1, 2, 3], "100": [1, 2], "1000": 2, "102174": [], "11": 2, "113959": [], "11574968": [], "12": 1, "12138546": [], "1225": 3, "12357159": [], "127797": [], "128745": [], "130": 2, "137451": [], "14159": 3, "15": 2, "150": 2, "151212": [], "153355": [], "15383974": [], "154": 2, "15763222": [], "16": [1, 2, 3], "166290": [], "169374": [], "17855413": [], "183777": [], "19971276": [], "2": 0, "20": [], "21459876": [], "21514317": [], "22": [], "220619": [], "22466308": [], "22722108611679165": 1, "23": [], "230942": [], "234381": [], "24": 2, "246372": [], "25": [1, 2, 3], "25097623": [], "253167": [], "254594": [], "25685736": [], "264": 2, "264261": [], "265": 2, "270435": [], "273713": [], "282552": [], "288791": [], "291939": [], "29260813": [], "295068": [], "296185": [], "29978765": [], "2x2": 2, "3": 0, "30": [2, 3], "31016631": [], "318526": 2, "32": 2, "32099643": [], "324007": [], "327": 2, "33026915": [], "3442733": [], "34714337": 2, "35": [2, 3], "350110": [], "36330421": [], "37": 2, "37228132": 2, "373919": [], "39": 2, "391991": 2, "3d": [1, 2], "3x3": 2, "410": 2, "41152632": 2, "41263254": [], "415782": [], "419523": [], "42": 2, "422": 2, "4256142": [], "42638864": [], "429932": [], "430490": [], "435078": [], "435593": 2, "43765552": [], "44": 1, "440513": [], "453202": [], "45398804": [], "460471": [], "468024": [], "47036559": [], "480066": [], "482436": 2, "490528": [], "492423": 2, "49731891": [], "498755": [], "50": 2, "526100": [], "526245": [], "52695194": [], "53": [], "530054": [], "53651539": 2, "545158": [], "555261": 2, "558357": [], "562114": [], "563880": 2, "569610": [], "57": 2, "57219658": [], "575324": [], "582797": [], "5998763": 2, "60": 2, "603": 2, "618404": [], "625": 3, "63": 2, "640340": [], "64181731": [], "64448507": [], "645725": 2, "649707": [], "65": 2, "653721": 2, "65437021": 2, "66805603": [], "670": 2, "67897942": 2, "684116": [], "697682": [], "7": [2, 3], "70292167": [], "703219": [], "70360658": [], "712417": [], "71856743": [], "722833": [], "723356": [], "72436375": [], "73": 2, "733507": 2, "734481": [], "736878": [], "74": 2, "74366638": [], "746566": [], "74807732": [], "75": 2, "763835": [], "76910543": [], "77": 2, "78083219": [], "780922": 2, "78252123": [], "790745": [], "8": [1, 3], "804": 2, "81": 2, "813318": 2, "82": 2, "821785": [], "823132": [], "831357": [], "83257677": [], "840": 2, "841431": 2, "843290": [], "85": 2, "851055": [], "852": 2, "858194": [], "86": 2, "86599082": 2, "87": 2, "872680": [], "879550": [], "88": 2, "884707": [], "88586208": [], "888187": [], "88821188": [], "89": 2, "9": [1, 2, 3], "90": 2, "900": 3, "903735": 2, "913378": [], "919537": [], "922371": [], "923769": [], "92578833": [], "928158": [], "931484": [], "934": 2, "94128165": [], "94459246": [], "95143119": 2, "954706": 2, "957231": [], "96641313": [], "966945": [], "A": [1, 3], "AND": 2, "And": [1, 2], "As": [1, 2], "By": [1, 2, 3], "For": [1, 2], "If": [1, 2, 3], "In": [1, 2, 3], "It": [2, 3], "NOT": 2, "OR": 2, "One": 2, "The": 1, "These": [1, 2, 3], "To": [1, 3], "With": [1, 2], "_2": 1, "abil": 2, "abl": [1, 2, 3], "about": 3, "abov": [1, 2], "academ": 1, "access": [1, 2, 3], "accordingli": 3, "accumul": 3, "achiev": 1, "across": [1, 2, 3], "actinium": 2, "action": 3, "ad": [2, 3], "add": [1, 2, 3], "addit": 1, "addition": 1, "advanc": 1, "after": 1, "ag": 3, "age_squar": 3, "aggreg": 2, "algebra": 2, "alia": 1, "alic": 3, "all": 1, "allow": [1, 2, 3], "along": 2, "also": [1, 2, 3], "altern": 3, "aluminum": 2, "alwai": [2, 3], "americium": 2, "an": [1, 2, 3], "analys": 1, "analysi": [1, 2], "analyz": [1, 2], "anatomi": 2, "ani": [1, 2, 3], "anim": 2, "annot": 2, "anonym": 3, "antimoni": 2, "appear": 1, "appl": 3, "appli": [1, 2, 3], "applic": [1, 2], "approach": 3, "approxim": 1, "ar": [1, 2], "area": [1, 2, 3], "argon": 2, "argument": 3, "arithmet": 1, "around": 1, "arr": 3, "arrai": 1, "ase": 1, "aspect": [2, 3], "assign": 3, "atom": [1, 2], "atomist": 1, "attract": 1, "autom": 1, "automat": 1, "avail": [1, 2], "avoid": 3, "awesom": 1, "ax": 2, "axi": 1, "b": [1, 2], "back": 3, "backward": 3, "banana": 3, "bar": [1, 2], "base": [2, 3], "basic": [1, 3], "becaus": 3, "becom": [2, 3], "befor": [1, 2, 3], "behav": 3, "being": 2, "below": 3, "best": 1, "better": 2, "between": [1, 2], "beyond": [1, 2], "bin": 2, "biologi": 1, "black": 2, "block": 3, "blue": 2, "bob": 3, "bond": 2, "both": [1, 2, 3], "box": 1, "bracket": 2, "bread": 2, "break": 3, "bring": 1, "broadcast": 2, "browser": 1, "build": [2, 3], "built": [1, 2, 3], "butter": 2, "c": [1, 2], "calcul": [1, 2, 3], "calculate_area": 3, "calculu": 1, "call": 3, "caller": 3, "can": [2, 3], "cantera": 1, "capabl": [1, 2], "carbon": 1, "carbon_mass": 1, "carlo": 1, "case": [1, 3], "cater": 2, "caus": 3, "certain": 3, "cesium": 2, "challeng": [1, 3], "chang": 2, "channel": 3, "char": 3, "charact": 3, "charli": 3, "chart": 2, "check": 2, "chemistri": 2, "cherri": 3, "circl": 3, "circular": 2, "citi": 3, "clarif": 3, "class": 2, "clean": 2, "clearli": 3, "co": 1, "code": [1, 2, 3], "cohes": 2, "collect": [2, 3], "color": [1, 2], "column": [2, 3], "combin": 3, "come": 1, "command": [1, 2], "comment": 2, "common": [2, 3], "commonli": [1, 2, 3], "commun": [], "comp": [], "compact": 3, "compar": 3, "complex": [1, 2, 3], "compon": [2, 3], "compound": 1, "comprehens": 2, "comput": [1, 3], "concept": 3, "concis": 3, "conclud": [1, 2], "condit": 2, "condition1": 3, "condition2": 3, "confid": [2, 3], "confirm": 2, "consid": 3, "constant": 1, "constitu": 2, "contain": [1, 2, 3], "continu": [1, 3], "contourpi": [], "control": 0, "conveni": 2, "convert": 3, "core": [2, 3], "cornerston": 2, "correspond": 3, "count": 3, "coupl": 1, "cours": [1, 2], "cover": [1, 2, 3], "creat": [1, 3], "criteria": 2, "critic": 2, "crucial": [1, 3], "csv": 2, "cycler": [], "dash": 2, "data": [1, 3], "databas": 2, "dataset": [2, 3], "dateutil": [], "decis": 3, "decompos": 2, "deepen": 1, "deepli": 2, "def": 3, "default": [1, 2], "definit": 2, "delv": 2, "demonstr": [1, 2], "depend": 3, "describ": 3, "descript": 3, "design": [1, 2, 3], "det": 2, "detail": [1, 2], "determin": [1, 2], "develop": 2, "df": [2, 3], "dictat": 3, "dictionari": 2, "differ": [1, 2, 3], "differenti": [1, 2], "dimension": 2, "dioxid": 1, "directli": [1, 2], "discuss": 3, "displai": [1, 2], "dispos": 1, "distanc": 2, "distribut": 2, "dive": 1, "divers": 1, "divis": [1, 3], "do": 3, "docstr": 3, "document": [1, 2, 3], "doe": 3, "doesn": 1, "don": [1, 2, 3], "dot": [2, 3], "dot_product": 2, "download": 2, "dtype": 2, "duplic": 3, "dure": 1, "dynam": [1, 3], "e": [2, 3], "each": [1, 2, 3], "eas": [1, 2], "easi": 2, "easier": [2, 3], "easili": [1, 2, 3], "ecosystem": 2, "edgecolor": 2, "effect": [], "effici": [2, 3], "eigenvalu": 2, "eigval": 2, "either": 3, "electron": 1, "eleg": [2, 3], "element": 2, "elsewher": 3, "emploi": 1, "enabl": [2, 3], "encapsul": 3, "encount": [1, 2], "end": [1, 2, 3], "energi": 2, "engin": [1, 2], "enhanc": 1, "ensur": [1, 2, 3], "env": [], "environ": [1, 2], "equal": [2, 3], "equat": [1, 2], "equilibria": 2, "equip": 1, "error": 1, "especi": [2, 3], "essenti": [0, 3], "ev": 2, "evalu": 3, "eventu": 3, "everi": 2, "exampl": [1, 2, 3], "excel": [1, 2], "execut": 3, "exist": 3, "expand": 3, "expect": 3, "experi": [1, 3], "explain": [2, 3], "explor": [1, 2, 3], "exponenti": 1, "express": [1, 3], "extend": [1, 2], "extens": 2, "ey": 2, "f": 2, "facilit": 3, "fall": 2, "fals": [2, 3], "far": [1, 2], "feel": 3, "few": [2, 3], "fibonacci": 3, "field": 2, "figur": 2, "file": 2, "fill": 2, "filter": 3, "filtered_df": 2, "final": 1, "find": [1, 2], "first": [1, 2, 3], "fit": 1, "flexibl": [2, 3], "float": [1, 2, 3], "float64": 2, "flow": 3, "fluorin": 2, "focu": [1, 2], "focus": 3, "follow": [1, 2, 3], "fonttool": [], "forget": [2, 3], "form": 3, "format": [1, 2], "forward": [1, 3], "foundat": 1, "fourier": 2, "free": 3, "frequenc": 2, "frequent": [1, 2, 3], "from": [1, 2, 3], "fruit": 3, "full": 2, "function": [1, 2], "function_nam": 3, "fundament": [1, 2, 3], "further": 3, "g": [2, 3], "gain": [1, 2], "gener": 3, "genom": 1, "get": 3, "give": [1, 3], "given": 3, "glimps": 1, "go": 1, "good": 3, "googl": 1, "gram": 1, "graphic": [1, 2], "great": 1, "greater": [2, 3], "greet": 3, "grid": 2, "group": 2, "guid": 3, "h": [1, 3], "ha": [1, 2, 3], "hamiltonian": 2, "handl": [1, 2, 3], "happen": 3, "have": [1, 2, 3], "heavili": 2, "hello": 3, "help": [1, 2, 3], "here": [1, 2, 3], "hesit": [1, 3], "higher": 2, "highli": [1, 2], "hint": [1, 2, 3], "hist": 2, "hold": [1, 2], "how": [1, 2, 3], "howev": 2, "hydrogen": 1, "i": 2, "idea": 3, "ideal": [1, 2], "ident": 2, "imag": 2, "import": [1, 3], "includ": [1, 2, 3], "incredibli": [2, 3], "increment": 3, "indefinit": 3, "index": [2, 3], "indispens": 2, "individu": 3, "industri": 1, "infinit": 2, "inform": [1, 2], "initi": 3, "input": [2, 3], "insid": 3, "insight": 2, "instanc": 1, "instruct": [1, 3], "integ": 2, "integr": 2, "interact": [1, 2], "interfac": 1, "interpol": 2, "interv": 2, "introduct": 0, "inv": 2, "invalu": [1, 2], "invers": 2, "item": [2, 3], "iter": 3, "iterrow": 3, "its": [1, 2, 3], "itself": 3, "journei": 1, "julia": 1, "jupyt": 2, "just": [1, 2, 3], "keep": 3, "kei": 1, "keyword": 3, "kind": 1, "kinet": 1, "kiwisolv": [], "kj": 2, "knowledg": 3, "l": 3, "label": [1, 2], "languag": 1, "larg": [2, 3], "last": 3, "later": 1, "latest": 1, "latex": 1, "lectur": 0, "legend": [1, 2], "less": 3, "let": 2, "leverag": 2, "lib": [], "librari": [1, 2], "like": [1, 2, 3], "linalg": 2, "line": [1, 3], "linear": 2, "linestyl": 2, "linspac": 2, "linux": 1, "list": [], "littl": 3, "live": 1, "ll": [1, 2, 3], "load": 2, "logic": 2, "long": 3, "look": 3, "luck": 3, "m": [1, 2], "m_inv": 2, "mac": 1, "machin": 1, "magnet": 2, "main": 3, "maintain": [2, 3], "major": 1, "make": [1, 2, 3], "mani": [1, 2], "manipul": 1, "manner": 2, "map": 3, "marker": 2, "mass": 1, "master": 1, "materi": 1, "math": 1, "mathemat": 2, "mathematica": 1, "matlab": 1, "matplotlib": 1, "matric": 2, "matter": 1, "max": 3, "maximum": 2, "mean": [1, 2], "mechan": 2, "meet": 2, "mercuri": 2, "merg": [2, 3], "messag": 3, "met": 3, "method": [2, 3], "method_nam": 3, "might": 1, "min": 3, "miniconda3": [], "minimum": 2, "model": 1, "modern": 1, "modifi": [1, 2], "modul": [1, 2], "modular": 3, "modulo": 3, "mol": 2, "molar": 1, "molar_mass": 1, "mole": [1, 2], "molecular": [1, 2], "mont": 1, "more": [2, 3], "most": [2, 3], "move": [1, 3], "much": [1, 2], "multi": 2, "multipl": [1, 2, 3], "multipli": [2, 3], "must": [1, 3], "my_dict": 3, "my_list": [2, 3], "n": [2, 3], "name": [1, 2, 3], "narr": 1, "ndarrai": 2, "need": [1, 2, 3], "never": 3, "new": [1, 3], "new_list": 3, "next": [1, 3], "none": 3, "notat": 3, "notebook": 2, "now": [1, 3], "np": [2, 3], "number": [1, 2], "numer": [1, 2, 3], "numpi": 1, "o": [1, 2, 3], "occur": 3, "offer": [1, 2], "offici": [1, 2], "often": [1, 3], "old_list": 3, "onc": [1, 2], "one": [1, 2, 3], "ones": 2, "onli": [1, 2, 3], "open": 1, "oper": [1, 3], "opportun": 2, "optim": 2, "option": 3, "order": 2, "organ": [1, 2, 3], "orient": 2, "origin": [1, 3], "orthonorm": 2, "other": [1, 2, 3], "otherwis": 3, "our": [1, 2], "out": [1, 2], "output": 2, "over": [2, 3], "overlap": 2, "overleaf": 1, "overview": 2, "own": [1, 3], "oxygen": 1, "oxygen_mass": 1, "p": 2, "packag": [0, 1], "pair": 3, "panda": 1, "paramet": 2, "parenthes": [2, 3], "part": 1, "particularli": [1, 2, 3], "path": 1, "pd": [2, 3], "pdf": 2, "per": 2, "perform": [1, 2, 3], "period": 2, "person": 3, "physic": [1, 2], "pillow": [], "pip": [1, 2], "pip3": 1, "plai": 2, "plot": 1, "plotli": 1, "plt": [1, 2], "png": 2, "point": 2, "popular": 1, "posit": [2, 3], "possibl": [1, 3], "potassium": 2, "power": [1, 3], "pre": 1, "predefin": 2, "predetermin": 3, "predict": 1, "prefix": 1, "prepar": 1, "present": [1, 2], "prevent": 2, "previou": 1, "primari": 2, "primarili": 1, "principl": 2, "print": [2, 3], "prob": [], "problem": [1, 2], "process": [1, 2, 3], "produc": 3, "product": 2, "program": [1, 3], "progress": [1, 2], "project": 1, "prompt": [1, 2], "properti": 1, "provid": [2, 3], "purpos": 2, "put": [1, 3], "pymatgen": 1, "pypars": [], "pyplot": [1, 2], "pyscf": 1, "python": 0, "python3": 1, "quacc": 1, "quantiti": 2, "quantum": [1, 2], "question": 3, "r": 1, "radiu": 3, "rand": 2, "randint": 2, "randn": 2, "random": 2, "rang": [1, 2, 3], "re": [1, 2, 3], "reach": 3, "reaction": [1, 2], "read": 3, "read_csv": 2, "readabl": 2, "readi": [1, 2], "real": 1, "reason": 3, "recogn": 1, "recommend": [1, 2], "red": 2, "reduc": 3, "redund": 3, "refer": [1, 2, 3], "reflect": 1, "regular": 3, "reinforc": 3, "relationship": 2, "reli": 2, "rememb": 1, "remov": 3, "render": 1, "repeat": 3, "repeatedli": 3, "repetit": 3, "report": 2, "repositori": 1, "repres": [1, 2], "requir": [2, 3], "research": 1, "resourc": 1, "respect": 1, "respond": 3, "respons": 3, "result": [1, 2, 3], "return": [2, 3], "reus": 3, "reusabl": 3, "revers": 3, "robust": 2, "role": 2, "root": [1, 2], "routin": 2, "row": [2, 3], "rubidium": 2, "run": [1, 2, 3], "sai": 1, "same": [1, 3], "satisfi": [], "save": 2, "scale": 1, "scatter": 1, "scatterplot": 2, "scientif": 1, "scikit": 1, "scipi": 1, "scratch": 2, "script": 2, "seaborn": 1, "second": 2, "see": [1, 3], "seen": 1, "send": 3, "separ": 2, "sequenc": [2, 3], "sequenti": 3, "seri": 3, "serv": 2, "set": [1, 2, 3], "sever": 1, "shape": 2, "share": 1, "sheet": 1, "short": 3, "should": [1, 2, 3], "show": [1, 2, 3], "shown": 2, "signal": 2, "similar": 2, "simpl": [1, 2, 3], "simplest": 3, "simpli": 1, "simplifi": 2, "simul": 1, "sin": 2, "sine": 2, "singl": 2, "site": [], "six": [], "skill": [1, 2, 3], "skip": 3, "slack": 3, "slice": 3, "small": 3, "smaller": 3, "so": [2, 3], "softwar": [1, 2], "solid": [1, 2], "solut": 2, "solv": [1, 2], "some": [1, 2, 3], "sourc": 2, "special": 1, "specif": 3, "specifi": 3, "spectroscopi": 2, "spread": 2, "spreadsheet": [1, 2], "sql": 2, "sqrt": 1, "squar": [1, 2, 3], "start": [2, 3], "state": 2, "statement": 1, "static": 2, "statist": [1, 2], "statsmodel": 1, "steroid": 2, "stoichiometr": 1, "storag": 2, "store": [1, 2, 3], "straightforward": [1, 2, 3], "strength": [1, 2], "string": 2, "strong": 2, "structur": [0, 1], "style": [1, 2], "subset": 2, "subtract": 1, "suit": [1, 2], "support": [1, 2], "sure": 1, "svg": 2, "symbol": 1, "syntax": [1, 2, 3], "system": [1, 2], "t": [1, 2, 3], "tab": 1, "tabular": [1, 2, 3], "tackl": [1, 2], "tailor": 1, "take": 3, "task": [1, 2, 3], "technic": 2, "techniqu": [1, 2], "termin": [1, 2, 3], "test": 1, "text": 1, "than": [2, 3], "thei": [1, 2, 3], "them": [1, 2, 3], "thermodynam": 1, "thi": [1, 2, 3], "thing": 3, "think": [2, 3], "those": 2, "three": 3, "through": [1, 2], "throughout": 2, "ti": 3, "time": 3, "titl": [1, 2], "to_csv": 2, "todai": 1, "togeth": 3, "too": 3, "tool": 1, "toolkit": 2, "top": [1, 2], "topic": 2, "touch": 1, "tradit": 2, "transform": [2, 3], "transport": 1, "trend": 2, "true": [2, 3], "try": [1, 2, 3], "tupl": 3, "twice": 1, "two": [1, 2, 3], "type": [1, 2, 3], "typic": 1, "u": 3, "ubiquit": 2, "underli": 2, "understand": [1, 2, 3], "uniqu": 3, "unit": 2, "unlik": 3, "unord": 3, "until": 3, "up": [1, 3], "upon": 1, "us": 1, "user": 1, "util": 3, "v": 2, "valu": [1, 2], "variabl": [1, 2, 3], "varieti": [1, 2], "variou": [1, 2], "vast": [1, 2], "ve": [1, 2, 3], "verifi": [1, 2], "versatil": [1, 2, 3], "version": 1, "visit": 1, "visual": 1, "vital": 2, "vowel": 3, "w": 2, "wai": [2, 3], "want": 2, "water": 1, "wavefunct": 2, "we": [1, 2, 3], "web": 1, "websit": 1, "welcom": 1, "well": 3, "wexler": [], "what": [1, 2], "when": [1, 2, 3], "where": 2, "whether": [1, 2, 3], "which": [1, 2, 3], "while": [1, 2], "why": 3, "wide": [1, 2], "wise": 2, "within": [1, 2, 3], "without": 3, "won": 2, "work": [1, 3], "workflow": 1, "workforc": 1, "world": 1, "write": 3, "written": [2, 3], "x": [1, 2, 3], "xenon": 2, "xlabel": [1, 2], "y": [1, 2, 3], "ylabel": [1, 2], "york": 3, "you": [1, 2, 3], "your": [1, 3], "yourself": [1, 3], "ytterbium": 2, "yttrium": 2, "zero": 2, "zinc": 2, "zirconium": 2}, "titles": ["Welcome to Computational Problem Solving in the Chemical Sciences", "Lecture 1: Introduction to Python for the Chemical Sciences", "Lecture 2: Essential Python Packages for the Chemical Sciences", "Lecture 3: Control Structures in Python"], "titleterms": {"": 1, "1": [1, 2, 3], "1d": 2, "2": [1, 2, 3], "2d": 2, "3": [1, 2, 3], "4": [1, 2, 3], "5": [1, 2, 3], "6": [1, 2, 3], "7": 1, "A": 2, "The": [2, 3], "addit": 3, "advanc": 2, "all": 3, "alreadi": 1, "ar": 3, "arrai": [2, 3], "basic": 2, "best": [2, 3], "can": 1, "check": [1, 3], "chemic": [0, 1, 2], "chemistri": 1, "comprehens": 3, "comput": [0, 2], "condit": 3, "control": 3, "creat": 2, "custom": 2, "data": 2, "datafram": [2, 3], "default": 3, "defin": 3, "dictionari": 3, "do": 1, "download": 1, "element": 3, "elif": 3, "els": 3, "essenti": 2, "even": 3, "exercis": [1, 2, 3], "factori": 3, "featur": 2, "filter": 2, "find": 3, "foundat": 2, "function": 3, "gener": 2, "get": 1, "graph": 1, "hand": 3, "higher": 3, "histogram": 2, "i": [1, 3], "import": 2, "infinit": 3, "instal": [1, 2], "introduct": [1, 3], "jupyt": 1, "kei": [2, 3], "lambda": 3, "launch": 1, "learn": [1, 2, 3], "lectur": [1, 2, 3], "let": 1, "line": 2, "list": [2, 3], "loop": 3, "manipul": 2, "mathemat": 1, "matplotlib": 2, "matrix": 2, "maximum": 3, "minimum": 3, "more": 1, "note": [1, 3], "notebook": 1, "number": 3, "numpi": [2, 3], "object": [1, 2, 3], "odd": 3, "oper": 2, "order": 3, "packag": 2, "palindrom": 3, "panda": [2, 3], "paramet": 3, "plot": 2, "power": 2, "practic": [1, 2, 3], "problem": 0, "properti": 2, "public": 2, "python": [1, 2, 3], "qualiti": 2, "read": 2, "remind": 2, "scatter": 2, "scienc": [0, 1, 2], "scientif": 2, "scipi": 2, "section": [2, 3], "seri": 2, "solv": 0, "specif": [1, 2], "start": 1, "statement": 3, "step": 1, "string": 3, "structur": [2, 3], "sum": 3, "through": 3, "tool": 2, "us": [2, 3], "v": 3, "valu": 3, "vector": 2, "visual": 2, "welcom": 0, "what": 3, "while": 3, "window": 1, "work": 2, "write": 2, "your": 2}}) \ No newline at end of file