Programming for Chemistry
A.Y. 2025/2026
Learning objectives
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
Expected learning outcomes
Students will acquire the ability to write and tune a program that automatizes simple computational tasks. They will be able to understand how a small piece of Python code works, to find the reasons of a malfunction and to correct it appropriately. Moreover, students will be able to use the NumPy and SciPy library to solve common numerical problems in physical-chemistry.
Lesson period: First semester
Assessment methods: Esame
Assessment result: voto verbalizzato in trentesimi
Single course
This course can be attended as a single course.
Course syllabus and organization
Single session
Responsible
Lesson period
First semester
Course syllabus
Introduction to Programming. Algorithmic thinking. Native data types. Functions, flow control and iterations. Basic data structures: lists, tuples, dictionaries. Object-oriented programming. Iterators and generators. Files I/O. Numpy multi-dimensional arrays and matrices. Plotting with Matplotlib. Applications of Scipy routines to image processing, Fourier transform of time series, solution of differential equations.
Prerequisites for admission
No prerequisites requested. Basic knowledge of working with a PC is advisable.
Teaching methods
The course is organized through a series of lectures using both slides and practical programming sessions.
Teaching Resources
Slides supplied by the instructor. Additionally, the online book: "How to think as a computer scientist: Learning with Python 3" (https://openbookproject.net/thinkcs/python/english3e/). Online documentation of Numpy, Scipy e Matplolib.
Assessment methods and Criteria
The oral examination is based on programming exercises. A final mark (on a 30 point scale) is given, by taking into account the knowledge of the subject and tools, and the clarity of the solutions.
Educational website(s)
Professor(s)