Created
August 14, 2012 19:00
-
-
Save vincentchu/3351734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
positions = [0, 1, 2, 3] | |
# Represents sequence ACTG | |
bases = { | |
0: "A", | |
1: "C", | |
2: "T", | |
3: "G" | |
} | |
# Represents energies at position n. Initialize it as empty dict | |
energies = {} | |
for pos in positions: | |
energies[pos] = random.random() # assign an energy to position pos; currently just random | |
print "position %4d - %s energy: %4.2f kcal/mol" % (pos, bases[pos], energies[pos]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment