Exemple #1
0
#! /usr/local/bin/python

import random
# Import the module
import folder

# The 20 canonical amino acids
aas = 'ACDEFGHIKLMNPQRSTVWY'
# Initialize the protein folder -- very important!
# side_length refers to the protein.  E.g., in the 5x5
# model, side_length=5.
side_length = 5
folder.init(side_length)

for i in range(100):
	# Create a random polypeptide
	prot = ''.join([random.choice(aas) for i in range(side_length*side_length)])
	# Fold it and retrieve its lowest-free-energy conformation, sid, and its
	# free energy of folding, dg.
	(sid, dg) = folder.foldProtein(prot)
	# Print them out
	print "%d\t%1.3f\t%s" % (sid, dg, prot)
def main():
    prot = sys.argv[1]
    folder.init(int(math.sqrt(len(prot))))
    (sid, dg) = folder.fold(prot)
    print sid, dg
Exemple #3
0
import random, math, os, sys
# Import the modules
import folder, decoyfolder
#sys.path = [os.path.expanduser('~/research/lib')] + sys.path
#import translate

# The 20 canonical amino acids
aas = 'ACDEFGHIKLMNPQRSTVWY'
# Initialize the protein folder -- very important!
# side_length refers to the protein.  E.g., in the 5x5
# model, side_length=5.

if True:
	side_length = 5
	prot_length = side_length*side_length
	folder.init(side_length)

	for i in range(10000):
		# Create a random polypeptide
		prot = ''.join([random.choice(aas) for xi in range(prot_length)])
		# Fold it and retrieve its lowest-free-energy conformation, sid, and its
		# free energy of folding, dg.
		(sid, dg) = folder.fold(prot)
		# Print them out
		if dg < -3:
			print "%d\t%d\t%1.3f\t%s" % (i, sid, dg, prot)
		'''
		print "sid g"
		for i in range(1):
			# Create a random polypeptide
			prot = ''.join([random.choice(aas) for i in range(prot_length)])
Exemple #4
0
def main():
	prot = sys.argv[1]
	folder.init(int(math.sqrt(len(prot))))
	(sid, dg) = folder.fold(prot)
	print sid, dg