Name: [116] Erik Thompson
Member: 94 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 ...

Developing emol! [ID:151]

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

1. 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. Here are the links for the two programs mentioned in the video: RasMol: http://openrasmol.org/ xscreensaver: http://www.jwz.org/xscreensaver/

2. Use Cases

Demonstrates use cases to document some of the requirements of a program. Wiki Link to the rest of the use cases: http://wiki.showmedo.com/index.php/Developing_emol#Use_Cases Amazon link to the book I mentioned: Writing Effective Use Cases by Alistair Cockburn http://www.amazon.com/Writing-Effective-Cases-Software-Development/dp/0201702258/ref=pd_bbs_sr_1?ie=UTF8s=booksqid=1198563112sr=8-1

3. Installing wxPython and PyOpenGL

Here are the links to the software packages mentioned in the video: PyOpenGL http://pyopengl.sourceforge.net/ PyOpenGL Download Page (I'm using version 2.0.1.09) http://sourceforge.net/project/showfiles.php?group_id=5988package_id=6035 wxPython http://www.wxpython.org/ wxPython Download Page (I'm using the 2.4 version, don't forget to download and install the demo application as well) http://www. [...]

4. 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. THANK YOU to all the authors (and German translators) of those code examples! Here are the links referenced in the video: 'Using Sizers' from the wxPython wiki: http://wiki.wxpython.org/UsingSizers The 'Python GUI Programming with wxPy [...]

5. 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. Here is the link to the wikipedia article on the 'Utah Teapot' otherwise known as the 'Newell Teapot' in honor of its author Martin Newell: http://en.wikipedia.org/wiki/Utah_teapot You can download the source code from the previous episode's page.

6. More OpenGL Examples

Here I talk about the examples that are included with PyOpenGL. I especially recommend studying and playing around with the code from the first 5 lessons of the well commented NeHe tutorial that were ported over to Python from C++. Here is the link to the NeHe tutorials: http://nehe.gamedev.net/ If you want to try the 6th lesson (textures) you will need to have the Python Imaging Library installe [...]

7. Class Diagrams

In this episode I present and talk about my class diagram. I made mention of a topic that I have very little skill with and that is design patterns. Here are links to a description of the ModelViewController and ModelViewPresenter Also check out the Google Talk on Python Design Patterns Part 1 and Part 2

8. 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. Here is the wiki links to the steps to create the new project: http://wiki.showmedo.com/index.php/Using_Launchpad_and_Bazaar I hope you found this video useful. Feel free to make edits to the wiki page or to add any comments regarding steps that could be improved. [...]

9. Preparing to Use the GPL & Using a Batch File with Bazaar

Here is a link to find the GPL version 3 and info about it: http://www.gnu.org/copyleft/gpl.html

10. 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. Here is a link to my project page where you can find the source code: https://launchpad.net/emol

11. 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.

12. Coding the PDB Class

In this episode I go over the PDB class I wrote for my emol! program. Here is the link from Georgia State University where I downloaded my amino acid test .pdb file: http://chemistry.gsu.edu/Glactone/PDB/Amino_Acids/aa.html

13. Copyright ©

In this video I talk about some of the history of U.S. copyright law, fair use, and open source licenses. Here is the link for the article Understanding Open Source Software by Red Hat's Mark Webbink, Esq. http://www.groklaw.net/article.php?story=20031231092027900

14. 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. The code for emol! so far is up revision 6 which can be downloaded using bazaar or (less easily) from here: https://code.launchpad.net/~mrlobster9 [...]

15. 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. The code for this episode is the 7th revision uploaded to launchpad which can be downloaded easily using bazaar or less easily from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel

16. 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. The code for this episode is the 8th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel

17. 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. To learn more about vector math for 3D programming check out this in depth tutorial: http://chortle.ccsu.edu/VectorLessons/vectorIndex.html The code for this episode is the 9th revision uploaded to launchpad which can b [...]

18. Drawing the Bonds as Cylinders

The molecule bonds are drawn as 3D cylinders. glRotate, gluCylinder, and vector math is used. The code for this episode is the 10th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel

19. 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. The code for this episode is the 11th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code [...]

20. Adding Color to the Atoms

I give the atoms some color, talk a bit about OpenGL lighting, and the CPK coloring system for atoms. Here are the links mentioned in the video: Online Color Picker CPK color section from the RasMol Manual The code for this episode is the 12th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel [...]

21. 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. The code for this episode is the 13th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel

22. Adding the Slideshow Feature

I get the slideshow functionality working using a wxPython Select Directory dialog and a new timer control. The code for this episode is the 14th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://code.launchpad.net/~mrlobster99/emol/devel

23. 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. Here is the link to the glutBitmapCharacter documentation: http://www.opengl.org/documentation/specs/glut/spec3/node76.html The code for this episode is the 15th revision uploaded to launchpad which can be downloaded easily using bazaar or from the launchpad website: http://cod [...]

24. 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. The code for this episode is the 16th revision uploaded to launchpad which can be downloaded easily using bazaar or from the la [...]

25. 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. SQLite is good for new users learning about what databases a [...]

26. SQLite Database Class

A python database class for use with SQLite databases.

27. 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. The code for this program is available at http://launchpad.net/emol (revision 18 for this version).

28. Using the Settings Class

Here I start to make use of the settings class I previously made from within my main wxPython code. The code for this episode is the 19th revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp:emol -r 19) or from the launchpad website: http://code.launchpad.net/emol/

29. 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. The code for this episode is the 20th revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp:emol -r 20) or from the launchpad website: http: [...]

30. 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. The code for this episode is the 21st revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp:emol -r 21) or from the launchpad website: http://code.launchpad.net/emol/

31. 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. The code for this episode is the 22nd revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp: [...]

32. 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. The code for this episode is the 23rd revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp:emol -r 23) or from the launchpad website: http://code.launchpad.net/emol/

33. 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. The code for this episode is the 24th revision uploaded to launchpad which can be downloaded easily using bazaar (bzr branch lp:emol - [...]

34. 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. Debian Python Policy Debian Policy Manual Debian New Maintainers’ Guide

35. 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. Additional Links: A Linux.com article on writing man pages man subdirectory info Desktop Entry Specification The code and files for this episode can be downloaded using bazaar: bzr branch lp:emol -r 27 I apologize for the [...]

Showmedo is a peer-produced video-tutorials and screencasts site for free and open-source software (FOSS)- with the exception of some club videos, the large majority are free to watch and download.

how to help » about » faq »

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education and documentation are relatively neglected in the Open-source world. Coders love to code, and explaining how best to use or improve the software tends to be deferred or even sidelined.

At Showmedo we believe the community can play a vital role here and also say thanks for the tools and software that make our lives easier. If you have a piece of software you love or a programming langugage you are enthusiastic about, why not make a screencast showing others how to use it? All the stuff you wish you'd been told, the tips, tricks, insights that would have saved you time and frustration.

Screencasting is easier than you think, and we're happy to help you. You can emailus for advice or just use some of the how-to screencasts on the site. This screencasting learning-pathis a good place to start.

Kudos and Thanks for Erik

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.

Content

Feedback

Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.

feedback@showmedo.com