Exemplo n.º 1
0
		#ball82_data = bbtmio.read_ball_file(ball_fn+'82')
		bbtmio.write_displacement_file(bbtmio.get_ball_coords(ball_data),
				bbtmio.get_ball_coords(ball_pdb_data),
				dfn)
		print( '\tFile '+pdbcode+'.displacement written.\n' )


	################################################
	# write extended ball and stick including supporting balls and sticks
	print( '\tPreparing extended ball and stick files for DSM analysis' )
	extballfn = pdbfn[:-4]+'.balls.ext'
	extstickfn = pdbfn[:-4]+'.sticks.ext'
	if os.path.isfile(extballfn) and os.path.isfile(extstickfn) and not args['overwrite']:
		print( '\tFile '+pdbcode+'.balls.ext and '+pdbcode+'.sticks.ext exists. Nothing changed.\n' )
	else:
		bbtmio.write_extended_files(ball_fn, stick_fn, extballfn, extstickfn)
		#bbtmio.write_extended_files(pdbfn[:-4]+'.balls', pdbfn[:-4]+'.sticks', extballfn, extstickfn)
		print( '\tFile '+pdbcode+'.balls.ext and '+pdbcode+'.sticks.ext written.\n' )


#	# trim the ball outside TM
#	TODO
#	if args['trim']:
#		print( '\tTrimming non TM parts in the ball and stick files' )
#		balltrim_fn = ball_fn + '.trim'
#		#ballpdbtrim_fn = ball_pdb_fn + '.trim'
#		sticktrim_fn = stick_fn + '.trim'
#		extballtrim_fn = extballfn + '.trim'
#		extsticktrim_fn = extstickfn + '.trim'
#		if os.path.isfile(balltrim_fn) and os.path.isfile(sticktrim_fn) and os.path.isfile(extballtrim_fn) and os.path.isfile(extballtrim_fn) and not args['overwrite']:
#			print( '\tTrimmed file of '+pdbcode+' exists. Nothing changed.\n' )
Exemplo n.º 2
0
import os
import glob
import random
# ignore annoying warnings from biopython
import warnings
from Bio import BiopythonWarning
warnings.simplefilter('ignore', BiopythonWarning)
# add the script path
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__))+'/../../../pyscripts/')
import bbtmml
import bbtmio
import bbtmequs
from typeutils import * 


datapath = '../../../dataubuntu/'

codes = [ '1BXW', '1FEP', '1I78', '1K24', '1KMO', '1NQE', '1P4T' ]

for coden in codes:
	restingballfn = datapath+'testdata/'+coden+'.balls.ideallarge'
	stickfn = datapath+coden+'.sticks'
	extrestingballfn = datapath+'testdata/'+coden+'.balls.ideallarge.ext'
	extstickfn = datapath+'testdata/'+coden+'.sticks.ideallarge.ext'

	bbtmio.write_extended_files(restingballfn, stickfn, extrestingballfn, extstickfn)

Exemplo n.º 3
0
Arquivo: extend.py Projeto: jksr/beta
import os
import glob
import random

# ignore annoying warnings from biopython
import warnings
from Bio import BiopythonWarning

warnings.simplefilter("ignore", BiopythonWarning)
# add the script path
import sys

sys.path.append(os.path.abspath(os.path.dirname(__file__)) + "/../../../pyscripts/")
import bbtmml
import bbtmio
import bbtmdsm
from typeutils import *


testset = ["1I78", "1T16", "1FEP", "1BXW", "2F1C", "1QJ8", "1NQE", "1UYN"]
for coden in testset:
    ballfn = "../../../data/testdata/" + coden + ".balls.ideallarge"
    stickfn = "../../../data/" + coden + ".sticks"
    newballfn = "../../../data/testdata/" + coden + ".balls.ideallarge.ext"
    newstickfn = "../../../data/testdata/" + coden + ".sticks.ideallarge.ext"

    bbtmio.write_extended_files(ballfn, stickfn, newballfn, newstickfn)