Example #1
0
		#,'{NM,WH,SH,NH}'
		#,'{5types} x {NM,WH,NWH}'
		#,'{5types} x {NM,WH,SH,NH}'
		]

datapath = '../../../data/'
codes = [ '1BXW', '1FEP', '1I78', '1K24', '1KMO', '1NQE', '1P4T' ]

pdbpathlist = [ datapath+code+'.pdb' for code in codes ]
ballpathlist = [ datapath+code+'.balls' for code in codes ]
stickpathlist = [ datapath+code+'.sticks' for code in codes ]
disppathlist = [ code+'.displacement' for code in codes ]


notrelative = [False, True]

for i in range(2):
	outf = open('result_'+str(notrelative[i])+'.txt', 'w')
	for j in range(len(ktypeassigners)):
		outf.write( '##############################' +'\n')
		outf.write( '~~~~~~~~~~~~~ k assignment ~~~~~~~~~~~~~~~~~' +'\n')
		outf.write( ktypeassignerdescriptions[j] +'\n')
		ktypeassigner = ktypeassigners[j]
		outf.write( str(ktypeassigner) +'\n')
		results = bbtmml.solvestiffness(pdbpathlist, ballpathlist, stickpathlist, disppathlist, ktypeassigner, notrelative[i])
		for k in results['ks']:
			outf.write( '~~~~~~~~~~~' +'\n')
			outf.write( str(k) +'\n')
			outf.write( '~~~~~~~~~~~' +'\n')
	outf.close()
Example #2
0
File: getk.py Project: jksr/beta
		'{H,P} x {NM,WH,NWH}'
		,'{H,P} x {NM,WH,SH,NH}'
		,'{NM,WH,NWH}'
		,'{NM,WH,SH,NH}'
		#,'{5types} x {NM,WH,NWH}'
		#,'{5types} x {NM,WH,SH,NH}'
		]

pdbpathlist = ['../../../datamac/1BXW.pdb']
ballpathlist = ['../../../datamac/1BXW.balls']
stickpathlist = ['../../../datamac/1BXW.sticks']
disppathlist = [ ['1BXW.dsm1_1k.displacement'], ['1BXW.dsm1_3k.displacement'] ]

outname = ['result_1k.txt','result_3k.txt']

for i in range(2):
	outf = open(outname[i], 'w')
	for j in range(len(ktypeassigners)):
		outf.write( '##############################' +'\n')
		outf.write( '~~~~~~~~~~~~~ k assignment ~~~~~~~~~~~~~~~~~' +'\n')
		outf.write( ktypeassignerdescriptions[j] +'\n')
		ktypeassigner = ktypeassigners[j]
		outf.write( str(ktypeassigner) +'\n')
		#results = bbtmml.solvestiffness(pdbpathlist, ballpathlist, stickpathlist, disppathlist[i], ktypeassigner, True)
		results = bbtmml.solvestiffness(pdbpathlist, ballpathlist, stickpathlist, disppathlist[i], ktypeassigner, False)
		for k in results['ks']:
			outf.write( '~~~~~~~~~~~' +'\n')
			outf.write( str(k) +'\n')
			outf.write( '~~~~~~~~~~~' +'\n')
	outf.close()
Example #3
0
#ballpathlist = [ datapath+code+'.balls' for code in codes ]
ballpathlist = [ datapath+'testdata/'+code+'.balls.ideallarge' for code in codes ]
stickpathlist = [ datapath+code+'.sticks' for code in codes ]
#disppathlist = [ datapath+code+'.displacement' for code in codes ]
disppathlist = [ datapath+'testdata/'+code+'.displacement.ideallarge' for code in codes ]

notrelative = [False, True]

for i in range(2):
	outf = open('result_'+str(notrelative[i])+'.txt', 'w')

	for ttt in range(len(codes)):
		print pdbpathlist[ttt]
		print ballpathlist[ttt]
		print stickpathlist[ttt]
		print disppathlist[ttt]
		outf.write('~~~~~~~~~~~~~~~~~~~~'+codes[ttt]+'\n')

		for j in range(len(ktypeassigners)):
			outf.write( '##############################' +'\n')
			outf.write( '~~~~~~~~~~~~~ k assignment ~~~~~~~~~~~~~~~~~' +'\n')
			outf.write( ktypeassignerdescriptions[j] +'\n')
			ktypeassigner = ktypeassigners[j]
			outf.write( str(ktypeassigner) +'\n')
			results = bbtmml.solvestiffness([pdbpathlist[ttt]], [ballpathlist[ttt]], [stickpathlist[ttt]], [disppathlist[ttt]], ktypeassigner, notrelative[i])
			for k in results['ks']:
				outf.write( '~~~~~~~~~~~' +'\n')
				outf.write( str(k) +'\n')
				outf.write( '~~~~~~~~~~~' +'\n')
	outf.close()