2025-2026 Programming for Chemistry course at the University of Milan
The course introduces students to imperative programming by referring to the Python language. The course is divided in two parts: the first presents Python and its object-oriented features, the second focuses on libraries that can be useful in scientific computation and data analysis, in particular NumPy and SciPy.
Where: Computer room 310, settore didattico, via Celoria
When: Tuesdays and Fridays 08:30-10:30, starting from Friday 26/09/2025
What: 48 hours (24 lab-lectures, 2 hours each)
Who: Dr. Davide Ceresoli, davide.ceresoli@cnr.it
You are free to bring your own laptop. In this case, on first lecture you’ll be required to setup a working Python system with Jupyter or VSCode. If you prefer working in the cloud, you will be requested to setup an account on Google Colab or Kaggle.
There are plenty of Python books/tutorial/course available for free, on many different topics. For example, a good book is How to think like a computer scientist in Python 3. Python 3 cheat sheet.
Because of AI code assistants (ChatGPT, Claude, Gemini, …) the exam will be individual and it will consist in few general questions + coding a simple algorithm.
Day | Hour | Room | Topic |
---|---|---|---|
26/09/2025 | 08:30-10:30 | 310 | 01: Introduction to Python and tools (slides, notebook) |
30/09/2025 | 08:30-10:30 | 310 | 02: Variables, data types, operators, conditionals, loops (notebook) |
03/10/2025 | 08:30-10:30 | 310 | 02b: Exercises on variables, loops, nested loops, … |
07/10/2025 | 08:30-10:30 | 310 | 03: Lists, tuples, sets, dictionaries, strings (notebook) |
10/10/2025 | 08:30-10:30 | 310 | 04: Functions: parameters, scope, return values (notebook) |
14/10/2025 | 08:30-10:30 | 310 | 05: Advanced functions: recursion, passing functions to functions, lambdas (notebook) |
17/10/2025 | 08:30-10:30 | 310 | 06: Misc topics: random numbers, file I/O, text processing (notebook) |
21/10/2025 | 08:30-10:30 | 310 | 07: Free programming practice #1, Q&A (notebook) |
24/10/2025 | 08:30-10:30 | 310 | 08: Object Oriented Programming (notebook) |
28/10/2025 | 08:30-10:30 | 310 | 09: Advanced Object Oriented Programming (notebook) |
31/10/2025 | 08:30-10:30 | 310 | 10: Computer graphics (notebook) |
07/11/2025 | 08:30-10:30 | 310 | 11: Let’s code a game (notebook) |
11/11/2025 | 08:30-10:30 | 310 | 12: Free programming practice #2, Q&A |
14/11/2025 | 08:30-10:30 | 310 | 13: NumPy |
18/11/2025 | 08:30-10:30 | 310 | 14: Numpy + Matplotlib |
21/11/2025 | 08:30-10:30 | 310 | 15: SciPy |
25/11/2025 | 08:30-10:30 | 310 | 16: Applications to chemistry |
28/11/2025 | 08:30-10:30 | 310 | 17: SymPy |
02/12/2025 | 08:30-10:30 | 310 | 18: Image processing |
05/12/2025 | 08:30-10:30 | 310 | 19: Fourier series (bring headphones) |
09/12/2025 | 08:30-10:30 | 310 | 20: Atomistic simulations with ASE |
12/12/2025 | 08:30-10:30 | 310 | 21: |
16/12/2025 | 08:30-10:30 | 310 | 22: |
19/12/2025 | 08:30-10:30 | 310 | 23: Free programming practice #3 & Farewel |