Ghost/Chemical_shift.py
def zero_Bfactor(self):
		'''function that zeros the value of Bfactor coloumn in pdb file'''
		
		if not os.path.isdir(os.path.join(os.getcwd(),'figures/')):
			os.system('mkdir figures')
		dir_name=os.path.join(os.getcwd(),'figures/')
		
		if os.path.isfile(self.pdb):
			fd=open(self.pdb)
			lines=fd.readlines()
			fd.close()
		else:
			raise FileNotFoundError, self.pdb
		
		file_name=dir_name+self.pdb[:-4]+'_zero'+'.pdb'
		fd=open(file_name,'w')
		
		for line in lines:
			type=string.strip(string.upper(line[:6]))
			if type=='ATOM':
				line=line[:60]+'  0.00'+line[66:]
			print >> fd, line
		fd.close()
function that zeros the value of Bfactor coloumn in pdb file
function that zeros the value of Bfactor coloumn in pdb file
function that zeros the value of Bfactor coloumn in pdb file
def zero_Bfactor(self):
		if not os.path.isdir(os.path.join(os.getcwd(),'figures/')):
			os.system('mkdir figures')
		dir_name=os.path.join(os.getcwd(),'figures/')
		if os.path.isfile(self.pdb):
			fd=open(self.pdb)
			lines=fd.readlines()
			fd.close()
		else:
			raise FileNotFoundError, self.pdb
		file_name=dir_name+self.pdb[:-4]+'_zero'+'.pdb'
		fd=open(file_name,'w')
		for line in lines:
			type=string.strip(string.upper(line[:6]))
			if type=='ATOM':
				line=line[:60]+'  0.00'+line[66:]
			print >> fd, line
		fd.close()
def zero_Bfactor ( self ) : if not os . path . isdir ( os . path . join ( os . getcwd ( ) , 'figures/' ) ) : os . system ( 'mkdir figures' ) dir_name = os . path . join ( os . getcwd ( ) , 'figures/' ) if os . path . isfile ( self . pdb ) : fd = open ( self . pdb ) lines = fd . readlines ( ) fd . close ( ) else : raise FileNotFoundError , self . pdb file_name = dir_name + self . pdb [ : - 4 ] + '_zero' + '.pdb' fd = open ( file_name , 'w' ) for line in lines : type = string . strip ( string . upper ( line [ : 6 ] ) ) if type == 'ATOM' : line = line [ : 60 ] + '  0.00' + line [ 66 : ] print >> fd , line fd . close ( )
function that zeros the value of Bfactor coloumn in pdb file
function that zeros the value of Bfactor coloumn in pdb file
'''function that zeros the value of Bfactor coloumn in pdb file'''
self