Introduction to Programming for Molecular Scientists
Learn fundamental programming concepts in Python including data types, file operations, and basic programming structures.
Overview
This foundational module introduces students to programming concepts essential for computational molecular science. Students will learn Python basics including variables, data types, control structures, and file operations through hands-on exercises designed for scientific applications.
The module emphasizes practical programming skills that serve as prerequisites for more advanced computational lessons in chemistry and molecular sciences.
Scientific Learning Objectives
- Apply programming concepts to solve basic scientific problems
- Connect programming fundamentals to molecular science applications
Cyberinfrastructure Learning Objectives
- Execute Python code in Jupyter notebook environments
- Understand basic programming concepts: variables, loops, conditionals
- Read and process data from files
- Debug simple programming errors
- Develop computational thinking skills for scientific problem-solving
Prerequisites
Scientific Prerequisites:
- High school level mathematics
- Basic understanding of scientific concepts
Programming Prerequisites:
- No prior programming experience required
Lesson Sequence:
This is Part 1 of 2 in the Python Foundations for Molecular Scientists path.
Course Materials
Introduction to Python
Introduction to Python programming language, basic data types, and operations.
Learning Objectives:
- Understand basic Python syntax and data types
- Learn about setting variables, for loops, and conditionals
- Write simple scripts in Jupyter notebooks to perform calculations
Reading Data from a File
Opening files using open, reading line by line, and searching for a pattern in the file.
Learning Objectives:
- Open a file and read its contents line by line
- Search for specific patterns in text files
- Extract relevant data from files
Student Repository
Complete Student Materials
Download or clone the complete repository with all notebooks, datasets, and supporting files.
View Repository Launch on ChemComputeInstructor Materials
Complete Instructor Package
Solutions for all notebooks, teaching notes, assessment rubrics, and additional examples.
Instructor ResourcesRequires instructor verification. Request access if you don't have permission.
Instructor Notes
Teaching tips:
• Students often need extra time with the file reading concepts in Part 2
• Encourage students to experiment with the code examples
• Common issue: students forget to run cells in order