Ghost/Chemical_shift.py
def accessibility(self):
		'''Calls whatif and save the accessibility of residues in a file'''
		
		if not os.path.isdir(os.path.join(os.getcwd(),'figures/')):
			os.system('mkdir figures')
		dir_name=os.path.join(os.getcwd(),'figures/')
		
		source='%swhatif_%s.txt'%(dir_name,self.pdb)
		fd=open(source,'w')
		fd.writelines(['/local/predrag/bin/whatif/DO_WHATIF.COM <<EOF\n',
			'GETMOL %s\n'%self.pdb,
			'\n',
			'%DELWAT\n',
			'%DELLIG\n',
			'%SETACC\n',
			'NOWAT 0\n',
			'\n',
			'%SHOACC\n',
			'TOT 0\n',
			'STOP\n',
			'Y\n'
			])
		fd.close()
		os.system('source %s > %saccessibility_%s.out' %(source,dir_name,self.pdb))
		fd=open('%saccessibility_%s.out' %(dir_name,self.pdb),'r')
		lines=fd.readlines()
		fd.close()
		for row in range(len(lines)):
			line=string.strip(lines[row])
			if line=='Res# Res    PDB#        Tot. Acc.     Back.     Side.':
				break
		fd=open('%saccessibility_%s.out' %(dir_name,self.pdb),'w')
		for i in range(row+1,len(lines)):
			line=string.strip(lines[i])
			if not line=='':
				print >> fd, line
			else:
				break
		fd.close()
Calls whatif and save the accessibility of residues in a file
Calls whatif and save the accessibility of residues in a file
Calls whatif and save the accessibility of residues in a file
def accessibility(self):
		if not os.path.isdir(os.path.join(os.getcwd(),'figures/')):
			os.system('mkdir figures')
		dir_name=os.path.join(os.getcwd(),'figures/')
		source='%swhatif_%s.txt'%(dir_name,self.pdb)
		fd=open(source,'w')
		fd.writelines(['/local/predrag/bin/whatif/DO_WHATIF.COM <<EOF\n',
			'GETMOL %s\n'%self.pdb,
			'\n',
			'%DELWAT\n',
			'%DELLIG\n',
			'%SETACC\n',
			'NOWAT 0\n',
			'\n',
			'%SHOACC\n',
			'TOT 0\n',
			'STOP\n',
			'Y\n'
			])
		fd.close()
		os.system('source %s > %saccessibility_%s.out' %(source,dir_name,self.pdb))
		fd=open('%saccessibility_%s.out' %(dir_name,self.pdb),'r')
		lines=fd.readlines()
		fd.close()
		for row in range(len(lines)):
			line=string.strip(lines[row])
			if line=='Res# Res    PDB#        Tot. Acc.     Back.     Side.':
				break
		fd=open('%saccessibility_%s.out' %(dir_name,self.pdb),'w')
		for i in range(row+1,len(lines)):
			line=string.strip(lines[i])
			if not line=='':
				print >> fd, line
			else:
				break
		fd.close()
def accessibility ( self ) : if not os . path . isdir ( os . path . join ( os . getcwd ( ) , 'figures/' ) ) : os . system ( 'mkdir figures' ) dir_name = os . path . join ( os . getcwd ( ) , 'figures/' ) source = '%swhatif_%s.txt' % ( dir_name , self . pdb ) fd = open ( source , 'w' ) fd . writelines ( [ '/local/predrag/bin/whatif/DO_WHATIF.COM <<EOF\n' , 'GETMOL %s\n' % self . pdb , '\n' , '%DELWAT\n' , '%DELLIG\n' , '%SETACC\n' , 'NOWAT 0\n' , '\n' , '%SHOACC\n' , 'TOT 0\n' , 'STOP\n' , 'Y\n' ] ) fd . close ( ) os . system ( 'source %s > %saccessibility_%s.out' % ( source , dir_name , self . pdb ) ) fd = open ( '%saccessibility_%s.out' % ( dir_name , self . pdb ) , 'r' ) lines = fd . readlines ( ) fd . close ( ) for row in range ( len ( lines ) ) : line = string . strip ( lines [ row ] ) if line == 'Res# Res    PDB#        Tot. Acc.     Back.     Side.' : break fd = open ( '%saccessibility_%s.out' % ( dir_name , self . pdb ) , 'w' ) for i in range ( row + 1 , len ( lines ) ) : line = string . strip ( lines [ i ] ) if not line == '' : print >> fd , line else : break fd . close ( )
Calls whatif and save the accessibility of residues in a file
Calls whatif and save the accessibility of residues in a file
'''Calls whatif and save the accessibility of residues in a file'''
self