COSMOS CLUSTER V, SUMMER 2018
COMPUTATIONAL BIOPHYSICS

INSTRUCTORS: Rajiv Singh , Dave Cone

GENERAL DESCRIPTION:
In order for biological organisms to function, the different ingredients in all the complex chemical reactions that sustain life need to come close together. How does that happen? Are the reactants moved into position by special transport objects ("molecular motors") or does nature rely on the reactants just finding each other randomly? In this cluster we will discuss the answer to that question, and, in particular, solve the problems of "diffusion" and "random walks" which are important not only in biology but in all sorts of natural processes. We'll learn how to address these topics both with "pencil and paper" calculations but also, when such calculations get too hard, with simulation programs. There are some technical things we need to learn along the way: the linux operating system of the computers we will be using and how to write programs in C and python. We won't assume students know too much about these things, so we'll do a lot of simple, but interesting warm-up programs before tackling our biophysics projects.


BASICS and COURSE SCHEDULE:

Where should I be?
Cluster Goals
Cluster Organization
Computers
Final project 2018

LINUX Operating System:
Review of linux operating system
Summary of Unix commands and tricks
Logging in and linux beginnings
Editing and hello.c
Compiling

C Programming:

Cluster 5 (Biophysics) Sequence with C
This is a summary of C programs we will review in the class.

C Program Samples :
helloworld.c
add.c
variables.c
odd_even.c
countC.c
factorial.c
quadratic_shell.c

PYTHON Programming:

"Think Python: How to Think Like a Computer Scientist" Allen Downey, Green Tree Press
This is a good introduction to python. Read chapters 1,2, and 3 for introduction. Use rest for reference.

"Python 3 Cheat Sheet" (Quick reference to python)
This a quick reference to basic python data types, operations, and syntax with examples.

"Numpy Cheat Sheet" (Quick reference to numpy package in python)
This a quick reference to basic numpy (numerical python) data types, operations, and syntax with examples.

Link to python.org website
There is a wealth of information about python on the internet. This link is the official website and is worth looking at. Click link to tutorials if you want an introduction to python.

Link to free python 3 distribution with anancoda (continuum analytics)
Use above link to download and install (for free) python on your windows/mac/linux machine. Note that you want to download and install the 64-bit python 3.5(or higher) graphical installer(for windows or mac).

Cluster 5 (Biophysics) Sequence with Python
This is a summary of python programs we will review in the class.

Example of python interactive session
This is a print out of a python interactive session tutorial similar to the one we will do in class. If you have python ( or ipython) installed on your computer (see link above), you can go through this session yourself for review.

Link to gallery of matplotlib (python) 2D graphics examples
There are a lot of on-line resources for python programming and graphics examples. This link is particularly valuable if you want to know how to create and enhance a graph using matplotlib.

Challenge problems in python programming/biophysics
This document has a list of problems for students who finish class exercises early and are looking for a challenge to work on. Beware some of these problems are really tough!

PYTHON Program Samples :

This section lists many of the programs and program "shells" we will use in class. A program shell is a program that is incomplete, missing important code that you will be asked to fill in and debug in class exercises. Program shells can be identified with the word shell in the program name below. Note that some exercises have multiple shell programs- e.g. ending in shell0, shell1,shell2 etc. When multiple shells are available , you will have a choice of which shell "level" to attempt- "shell0" is the easiest, "shell1" is somewhat harder, "shell2" harder still, etc. If a level is too hard for you (or takes too much time), you can always drop down to the next shell level to complete.

Warm-up programs
helloworld.py
odd_even.py
magic8ball.py
factorial_basic.py
factorial_function.py
basic_plot.py
quadratic_shell0.py (easier)
quadratic_shell1.py (harder)

Predator-Prey Analysis
Description of predator prey model and Lotka-Volterra equations
Graph of Hare vs Lynx populations in Northwest Territories: 1840-1940

predator_prey_shell0.py (easier)
predator_prey_shell1.py
predator_prey_shell2.py (harder)

Central Dogma of Biology: DNA to proteins
Francis Crick's original paper on Central Dogma (1970)
More recent paper explaining Central Dogma and modern interpretations
Radial table with mapping of RNA codons to amino acids
Table of amino acids
RNA_codons.txt
DNA_seq_random.txt

RNA_translation_shell0.py (easier)
RNA_translation_shell1.py
RNA_translation_shell2.py
RNA_translation_shell3.py (harder)

Probability and Gambler's Ruin
Pseudo code (text) for calculating "pi"
RNG_program.py
mersenne_twistor.py

gamblersruin1_shell0.py (easier)
gamblersruin1_shell1.py (harder)
Sample output of gamblers ruin 1 program

gamblersruin2_shell0.py (easier)
gamblersruin2_shell1.py
gamblersruin2_shell2.py (harder)
Sample output of gamblers ruin 2 program (histogram)

1D Random walks

randwalk1d_one_shell0.py (easier)
randwalk1d_one_shell1.py (harder)

randwalk1d_mult_shell0.py (easier)
randwalk1d_mult_shell1.py (harder)

randwalk1d_hist_shell0.py (easier)
randwalk1d_hist_shell1.py (harder)
Sample output of 1d randomwalk histogram

2D Random walks

randwalk2d_simple_shell0.py (easier)
randwalk2d_simple_shell1.py
randwalk2d_simple_shell2.py (harder)
Sample output of 2d simple randomwalk

randwalk2d_box_shell0.py (easier)
randwalk2d_box_shell1.py
randwalk2d_box_shell2.py (harder)
Sample output of 2d randomwalk inside box

randwalk2d_mod.py (module for box)
randwalk2d_box1.py (uses module for box)

randwalk2d_target_shell0.py
Sample output of 2d randomwalk inside box with target

randwalk2d_mod1.py (module for target histogram )
randwalk2d_target_hist.py (uses module for target)
Sample output of 2d randomwalk target histogram

3D Random walks and supporting class modules
shapes3d_class.py
randwalk3d_class.py
randwalk3d_target_oo_one.py
randwalk3d_target_oo_mult.py
randwalk3d_target_oo_hist.py