
Explore Python, the language Guido van Rossum introduced in 1991, and learn why its clear syntax and versatility empower data science, scientific computing, AI, chemistry applications.
Explore the concept of strings by examining characters, indices, and zero-based indexing, including accessing elements, using -1 for the last, and slicing, as in I love science.
Explore string fundamentals and manipulation methods in Python, including length, type conversion (numbers to strings and strings to numbers), indexing, slicing, and f-strings with examples like I love programming.
Learn to use if, else, and elif in Python to implement conditional logic with indentation. Explore intermediary conditions like less than one, between one and two, between two and three.
Write a Python program that reads a smiles string and detects double bonds and heteroatoms, then shows whether the molecule has double bonds, heteroatoms, or both.
Learn a Python exercise to classify a molecule's functional group from a smiles string, identifying alcohol, aldehyde, or hydrocarbon with conditional logic. It covers handling input case and rule-based output.
Create a python program that generates the name of an organic compound from a smiles code, using prefixes for carbon count, infix for double bonds, and suffixes for functional groups.
Discover the concept of loops in Python, including for loops and while loops, to automate tasks by iterating over numbers and characters and updating conditions.
Practice Python loops to solve chemistry problems, calculating molecular weights for substances composed of carbon, hydrogen, and oxygen, and using a while-loop driven menu to apply the ideal gas law.
Use Python to calculate the molecular weight of carbon, hydrogen, and oxygen substances by defining atomic masses and looping through multiple molecules, printing each substance's grams per mole.
Create a Python menu to solve the ideal gas law, calculating P, V, T, or n from user input, with option validation and results in Kelvin.
Explore Python data structures, focusing on tuples, lists, and dictionaries; learn indexing, slicing, and how to add or remove elements in lists and use key–value pairs in dictionaries.
Explore how to work with nested data structures in Python, including lists, tuples, and dictionaries, and learn techniques to index, iterate, and access elements and coefficients.
Calculate molecular masses for multiple molecules using a dictionary of atomic masses, taking user input for carbon, hydrogen, and oxygen counts and printing grams per mole.
Develop a Python tool to compute the empirical and molecular formulas from element percentages and atomic masses, using ratio normalization and a glucose example.
The lecture shows how to obtain the least integer coefficients by converting floating point reaction ratios to integers via successive multiplications, and outlines code to generate integer mols.
Generate the empirical formula of a compound with Python using the least integer moles as coefficients, building the formula string and converting numbers to strings.
Write a Python script to generate a compound’s empirical and molecular formulas, calculating the empirical molar mass and the ratio to derive the molecular formula, e.g., C6H12O6.
Explore the concept of functions in the functional paradigm, defining inputs and data transforms, and outputs, with examples of single and multiple arguments and returning results.
Explore how Python functions act like formulas, taking inputs (parameters) and returning outputs like density, with mass and volume and a quadratic function; future notes mention optional parameters.
Learn how the python math module groups related functions like sqrt, log, pi, e, sin, cos, tan, factorial, and rounding; import math and call functions as math.function using dot notation.
Write a Python function to compute the pH from a hydrogen ion concentration using minus log base ten, importing the math module.
Create a Python function that takes a tuple of chemical elements and a number, uses the random module to return that many randomly selected elements as a list.
Are you a person with a background in chemistry, engineering, biology, or physical sciences interested in learning a programming language to model problems of chemistry with programming? Or maybe you are someone from a computer science background who is curious about how to model problems of chemistry computationally.
In this course, you'll know how to model different chemistry problems with Python! Through each section, you'll learn (or review) basic concepts of the programming language Python! The following classes are exercises in which I explain some problems of chemistry. After watching these classes, it is expected that you try to solve these problems by yourself. In the following videos, I solve the problems of chemistry step-by-step in the programming language Python.
Each chapter is structured as follows:
Basic lectures about some subjects of Python (variables, data types, loops, etc.
Videos of exercises, in which I explain the problems of chemistry that you must model in Python
Videos of the exercises being solved
Also, there are three projects that you must solve after you watch a certain number of classes. In the first project, you must write code that reads a string of characters representing an organic compound (as SMILES) and generates the name of the compound according to IUPAC rules. In the second project, you must write code that generates the molecular formula of a compound given the elements present in the substance, their molar masses, and their relative amounts in a sample. And finally, in the third project, you must write a program that balances a chemical equation by multiplying the components of the reaction by random coefficients. Each of these projects is cumulative and requires knowledge about the commands and methods that have been seen so far in Python.
Since this course is introductory, we will only use built-in commands and libraries.