Name: [116] Erik Thompson
Member: 36 months
Authored: 44 videos
Description: Hi! I am currently a full time student at California State University Long Beach. I recently began to do research in molecular dynamics. I have interests in Python programming, physics, chemistry, and 3D simulation. Also I like bird watching! Here are some of photos I've taken: http://ww ...

[151] Developing emol!  (35 videos)

a series of video-tutorials by Erik Thompson

This video series will document the development of a moderately complex program from start to finish. Everything from planning, creating class diagrams, going over the code, and creating a .deb file for Ubuntu/Debian distribution will be covered.

Key libraries used will be wxPython, OpenGL, and sqlite.

Most software projects fail. Will this one fail too?! Watch this series as it is published to find out!

Video Tutorials

[458] Introduction

This video series is intended to document the development from start to finish of a moderately complex program. An open-source, cross-platform, molecular (.pdb file) viewing, slideshow capable program to be precise.

[471] Use Cases

Demonstrates use cases to document some of the requirements of a program.

[474] Installing wxPython and PyOpenGL

Here are the links to the software packages mentioned in the video:

[475] wxPython and PyOpenGL Example 1

In this episode I use my extreme copy and pasting skills to mash other great Python examples into one big combined example of using wxPython, Sizers, and PyOpenGL.

[477] Going Over the OpenGL Example Code

Here I walk through the OpenGL portion of the example code and talk about some of the basics regarding OpenGL.

[481] More OpenGL Examples

Here I talk about the examples that are included with PyOpenGL.

[482] Class Diagrams

In this episode I present and talk about my class diagram.

[484] Getting Started with Launchpad and Bazaar in 20 Minutes

This video shows the steps to create a new open-source project hosted by Launchpad.net using Bazaar as the version control software.

[489] Coding the Molecule, Atom, and Bond Classes

In this episode I go over three classes of code, give a tip on using pageant to automatically load the private key, and improve my batch script controlling Bazaar.

[496] Bugfix in molecule module

I modify the molecule module a bit to fix a bug having to do with default optional parameters that are declared as lists, tuples, or dictionaries. Also I modify the Bazaar uploading batch script a bit and show how to download the source code from projects on Launchpad using Bazaar.

[500] Coding the PDB Class

In this episode I go over the PDB class I wrote for my emol! program.

[511] Copyright ©

In this video I talk about some of the history of U.S. copyright law, fair use, and open source licenses.

[532] Claiming Fair Use and Adding the wxPython Code

In this episode I give my fair use justifications for adding example code without a clear license found on websites and in programming documentation to my GPL application. I also add the wxPython code that I had before and throw in a File Open dialog.

[756] Completing the wxPython File Open Dialog

I finish up the File Open Dialog and use the returned path to allow the my OpenGL's OnDraw() method to see all the coordinates of a selected PDB file.

[757] Drawing the Atoms as Spheres

Instead of printing the atom's coordinates to the console, we now draw them as spheres on the 3D canvas.

[766] Vector Math for 3D Programming

In this episode I talk about the basics of vector math as it applies to 3D programming. I'll be using vector math to properly position the cylinders as bonds in the next episode.

[770] Drawing the Bonds as Cylinders

The molecule bonds are drawn as 3D cylinders. glRotate, gluCylinder, and vector math is used.

[771] Calculating Bonds not in the .pdb File

Often the bond information isn't included in a .pdb file. In this episode I go over the code to calculate those bonds. Also I go over a bugfix to the DrawBond() method from the last episode for when the angle of rotation is 0 or 180 degrees.

[773] Adding Color to the Atoms

I give the atoms some color, talk a bit about OpenGL lighting, and the CPK coloring system for atoms.

[775] Using a wxPython Timer to Rotate the Molecule

I show how to use a wxPython Timer control and use that timer to help automatically rotate my 3D molecule.

[778] Adding the Slideshow Feature

I get the slideshow functionality working using a wxPython Select Directory dialog and a new timer control.

[795] OpenGL Text and a wxPython Checked Menu Option

In this episode I draw the molecule name on the OpenGL scene and add a checked menu item to toggle that name on and off.

[804] Centering the Molecule, Aspect Ratio, Zooming to Size

In this episode I center the molecule in case it isn't already centered as well as make a rough calculation of its size. I maintain aspect ratio of the OpenGL scene during screen resizes and adjust the zoom so that both big and small molecules fit into the current view.

[973] SQLite from Python: Database Basics

SQLite is a database with support built into python 2.5 and greater. It is notable for storing the data into a very small, portable file while using the same basic SQL syntax used by much larger, and not so portable, databases. SQLite has been released to the public domain so there are no licensing issues to worry about when using it.

[974] SQLite Database Class

A python database class for use with SQLite databases.

[978] Added Settings Class that uses SQLite Database

I created a class that will call my database class with the appropriate SQL commands to retrieve and store my settings data.

[979] Using the Settings Class

Here I start to make use of the settings class I previously made from within my main wxPython code.

[1012] Adding a wxPython Dialog

Here I add a wxPython dialog and some controls using absolute positioning. The wxPython integer control and others are also discussed. The dialog is currently used to make and save changes to the slideshow delay setting.

[1013] Saving Additional Settings From the Dialog

Here I save the rest of the settings from the wxPython dialog to the SQLite database. The Slider and Choice wxPython widgets are discussed.

[1017] Enabling the Additional Settings

This time we get the rest of the settings from the dialog to be fully enabled within the program rather than merely being able to save themselves to the database. These newly enabled settings are the molecule rotation speed, molecule rotation axis, and slideshow order.

[1504] wxPython FileHistory and Launchpad Code View

Here I show how to view recent revisions from the Launchpad.net code view page. Then I go over two bug fixes and the new file history feature that was added to the program.

[1505] Switching to Ubuntu for Further Development

In this episode I switch from developing in Windows XP to developing in Ubuntu Hardy Heron. The requires downloading the libraries my program depends on, downloading bazaar to download and upload my code from launchpad, and importing a new ssh key into launchpad.

[1534] Directory Structure of Program in Linux

In this episode I describe the files and directories that will make up my application once it is complete.

[1535] Create Man Page, Desktop Entry File, and Icon

Here I create three additional files that I will be distributing with my application: the man page, the program icon, and the .desktop file so the icon will appear in the menu.

Kudos and Thanks for Erik

Learn Python the easy way!
If you want to learn the Python programming language from a very gentle start or are looking to increase your ability to do cool things with Python, check out our club
View this series as a one-page learning-path
This feature is for club members. Click here to find out more.

Learning Paths

This series lies on the following learning-paths. Learning-paths are a new initiative at Showmedo, to start structuring our content better. You can find out more here.

Ian Ozsvald You will have learned how to write several complete applications including an image viewer [...]
Ian Ozsvald You'll know how to use Python for math and physics and you'll have tools that are similar [...]
Ian Ozsvald and Horst Jens and dgd and Kyran Dale and Erik Thompson You'll know how to use wxPython, easyGui and PythonCard to build Graphical User Interfaces

By the Same Author

Erik Thompson Interested in 3D programming, physics and Python? Erik Thomspon introduces 3D programming [...]