Python Short Course
Lecture 1: Python Overview

Course Outline

Why I Like Python

Using Python Interactively

Running Python Programs

Setting up Emacs for Python

Jaguar Geometry Optimization Viewer

Animation from XBS

Output of Optimization Energies

Example: Jaguar output reader

Import statement

Strings, lists, floats

Python Data Structures

Container Data Structures

Lists

Adding to Lists

Example: Jaguar output reader

Python functions

get_all_energies function

Flow Control: Looping

for and range

Regular Expressions

String manipulations

Example: Jaguar output reader

get_all_geos function

get_one_geo function

Data structures for molecules

Example: Jaguar output reader

Python output

write_xyz_file function

Example: Jaguar output reader

Gnuplot Module

Gnuplot Sample Graph

Gnuplot Data

Output from Jaguar Optimization

Example: Jaguar output reader

Calling external functions

Importing and $PYTHONPATH

References