PEATSA/Core/Programs.py
def _singleScan(self, mutationSet, defaults, mutantCollection):
	
		'''Does a scan of the pdb defined by mutationSet
		
		This is a private method. Do not call externally
		
		Parameters
			mutationSet is a Data.MutationSet instance
			defaults are the parameters to pass to calc_dpKa
			mutantCollection is the Data.MutantCollection instance the mutationSet
			is part of.'''
		
		#Import this module here so it won't cause the program to immediatey fail
		#on start if it missing. If it is missing then Environment.Configuration instance
		#will have already noticed and dealt with the situtation
		import pKa
		
		# Set what the residue is being mutated to - usually ALA
		defaults['mutations'][0] = mutationSet.codeString(self.pdb, reduced=False)
		self.environment.output('Mutation %s' % defaults['mutations'][0], rootOnly=False)
		
		#This was a conversion done internally in run_opt.
		#Now that its here the conversion to the defaults ivar format looks
		#redundant. Will be changed at some later stage
		params={}
		for key in defaults.keys():
			params[key]=defaults[key][0]

		print defaults
		#Create a new designer if none was created so far
		if self.designer is None:
			self.designer = pKa.Design_pKa.Design_pKa(params)
		else:
			# If we have an instance then just copy parameters
			self.designer.params=params.copy()
			self.designer.parse_parameters()
 
		filename = mutantCollection.fileForMutationSet(mutationSet)
		self.designer.name = pKa.Design_pKa.print_setup(params)
		self.designer.mutfile_names={mutationSet.codeString(self.pdb, reduced=False):filename}
		self.environment.output('Mutation File %s' % self.designer.mutfile_names, rootOnly=False)
		solutions = self.designer.calc_dpKa()
		
		#Convert the information from the (annoying ;-) format its in
		#Note: Key is a string rep of a list with the code in it e.g. "['A:0005:GLU:ALA']"
		key = repr(mutationSet.mutationCodes(self.pdb, reduced=False))
		aList = [mutationSet.codeString(self.pdb, reduced=True)]
		for residue in self.ionisableResidues:
			print 'The results for %s are %s' % (residue, solutions)
			try:
				aList.append(solutions[key][residue])
			except KeyError:
				#This reisdue is the mutation residue - just add 0 for this
				aList.append(0)
			except TypeError:
				#The result (solutions[key]) is None
				aList.append('Error')	

		print 'The converted list %s' % aList
				
		return aList
Does a scan of the pdb defined by mutationSet
		
		This is a private method. Do not call externally
		
		Parameters
			mutationSet is a Data.MutationSet instance
			defaults are the parameters to pass to calc_dpKa
			mutantCollection is the Data.MutantCollection instance the mutationSet
			is part of.
Does a scan of the pdb defined by mutationSet
This is a private method. Do not call externally

Parameters
mutationSet is a Data.MutationSet instance
defaults are the parameters to pass to calc_dpKa
mutantCollection is the Data.MutantCollection instance the mutationSet
is part of.
Does a scan of the pdb defined by mutationSet This is a private method . Do not call externally Parameters mutationSet is a Data . MutationSet instance defaults are the parameters to pass to calc_dpKa mutantCollection is the Data . MutantCollection instance the mutationSet is part of .
def _singleScan(self, mutationSet, defaults, mutantCollection):
		import pKa
		defaults['mutations'][0] = mutationSet.codeString(self.pdb, reduced=False)
		self.environment.output('Mutation %s' % defaults['mutations'][0], rootOnly=False)
		params={}
		for key in defaults.keys():
			params[key]=defaults[key][0]
		print defaults
		if self.designer is None:
			self.designer = pKa.Design_pKa.Design_pKa(params)
		else:
			self.designer.params=params.copy()
			self.designer.parse_parameters()
		filename = mutantCollection.fileForMutationSet(mutationSet)
		self.designer.name = pKa.Design_pKa.print_setup(params)
		self.designer.mutfile_names={mutationSet.codeString(self.pdb, reduced=False):filename}
		self.environment.output('Mutation File %s' % self.designer.mutfile_names, rootOnly=False)
		solutions = self.designer.calc_dpKa()
		key = repr(mutationSet.mutationCodes(self.pdb, reduced=False))
		aList = [mutationSet.codeString(self.pdb, reduced=True)]
		for residue in self.ionisableResidues:
			print 'The results for %s are %s' % (residue, solutions)
			try:
				aList.append(solutions[key][residue])
			except KeyError:
				aList.append(0)
			except TypeError:
				aList.append('Error')	
		print 'The converted list %s' % aList
		return aList
def _singleScan ( self , mutationSet , defaults , mutantCollection ) : import pKa defaults [ 'mutations' ] [ 0 ] = mutationSet . codeString ( self . pdb , reduced = False ) self . environment . output ( 'Mutation %s' % defaults [ 'mutations' ] [ 0 ] , rootOnly = False ) params = { } for key in defaults . keys ( ) : params [ key ] = defaults [ key ] [ 0 ] print defaults if self . designer is None : self . designer = pKa . Design_pKa . Design_pKa ( params ) else : self . designer . params = params . copy ( ) self . designer . parse_parameters ( ) filename = mutantCollection . fileForMutationSet ( mutationSet ) self . designer . name = pKa . Design_pKa . print_setup ( params ) self . designer . mutfile_names = { mutationSet . codeString ( self . pdb , reduced = False ) : filename } self . environment . output ( 'Mutation File %s' % self . designer . mutfile_names , rootOnly = False ) solutions = self . designer . calc_dpKa ( ) key = repr ( mutationSet . mutationCodes ( self . pdb , reduced = False ) ) aList = [ mutationSet . codeString ( self . pdb , reduced = True ) ] for residue in self . ionisableResidues : print 'The results for %s are %s' % ( residue , solutions ) try : aList . append ( solutions [ key ] [ residue ] ) except KeyError : aList . append ( 0 ) except TypeError : aList . append ( 'Error' ) print 'The converted list %s' % aList return aList
Does a scan of the pdb defined by mutationSet
This is a private method.
Does a scan of the pdb defined by mutationSet This is a private method .
'''Does a scan of the pdb defined by mutationSet
		
		This is a private method. Do not call externally
		
		Parameters
			mutationSet is a Data.MutationSet instance
			defaults are the parameters to pass to calc_dpKa
			mutantCollection is the Data.MutantCollection instance the mutationSet
			is part of.''' #Import this module here so it won't cause the program to immediatey fail #on start if it missing. If it is missing then Environment.Configuration instance #will have already noticed and dealt with the situtation # Set what the residue is being mutated to - usually ALA #This was a conversion done internally in run_opt. #Now that its here the conversion to the defaults ivar format looks #redundant. Will be changed at some later stage #Create a new designer if none was created so far # If we have an instance then just copy parameters #Convert the information from the (annoying ;-) format its in #Note: Key is a string rep of a list with the code in it e.g. "['A:0005:GLU:ALA']" #This reisdue is the mutation residue - just add 0 for this #The result (solutions[key]) is None
self
mutationSet
defaults
mutantCollection