PEATSA/Core/Environment.py
def designPKAOptions(self):
	
		'''Returns the options for the scan calculation in the format used by Design_pKa.run_opt
		
		Exceptions
			Raises an Exceptions.EnvironmentError if the pKa modules cannot be found'''
		
		try:
			import pKa.Design_pKa as Design_pKa
		except ImportError:
			raise Exceptions.ConfigurationError, "Cannot located Design_pKa module. Check correct path specified in configuration"
		
		#Get the default options
		defaults = Design_pKa.get_defaults()
		
		#Go through sections and set values
		for section in Configuration.scanSections:
			for option in self.configuration.options(section):
				#print option
				#print defaults[option]
				#Do some translating
				if self.configuration.get(section, option) == 'None':
					defaults[option][0] = None
					#print 'None conversion - Changed value of %s to %s' % (option, defaults[option])
				elif type(defaults[option][0]) == float:
					defaults[option][0] = float(self.configuration.get(section, option))
					#print 'Float conversion - Changed value of %s to %s' % (option, defaults[option])
				elif type(defaults[option][0]) == int:
					defaults[option][0] = int(self.configuration.get(section, option))
					#print 'Int conversion - Chaged value of %s to %s' % (option, defaults[option])
				elif type(defaults[option][0]) == bool:
					confValue = self.configuration.get(section, option)
					#Accepts 1,0, True and False
					if confValue == 'True':
						confValue = True
					elif confValue == 'False':
						confValue = False
					else:
						confValue = bool(int(confValue))	

					defaults[option][0] = confValue
					#print 'Bool - Changed value of ', option, ' to ', defaults[option]
				else:
					defaults[option][0] = self.configuration.get(section, option)
					#print 'No conversion - Changed value of %s to %s' % (option, defaults[option])
		
		return defaults
Returns the options for the scan calculation in the format used by Design_pKa.run_opt
		
		Exceptions
			Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
Returns the options for the scan calculation in the format used by Design_pKa.run_opt
Exceptions
Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
Returns the options for the scan calculation in the format used by Design_pKa . run_opt Exceptions Raises an Exceptions . EnvironmentError if the pKa modules cannot be found
def designPKAOptions(self):
		try:
			import pKa.Design_pKa as Design_pKa
		except ImportError:
			raise Exceptions.ConfigurationError, "Cannot located Design_pKa module. Check correct path specified in configuration"
		defaults = Design_pKa.get_defaults()
		for section in Configuration.scanSections:
			for option in self.configuration.options(section):
				if self.configuration.get(section, option) == 'None':
					defaults[option][0] = None
				elif type(defaults[option][0]) == float:
					defaults[option][0] = float(self.configuration.get(section, option))
				elif type(defaults[option][0]) == int:
					defaults[option][0] = int(self.configuration.get(section, option))
				elif type(defaults[option][0]) == bool:
					confValue = self.configuration.get(section, option)
					if confValue == 'True':
						confValue = True
					elif confValue == 'False':
						confValue = False
					else:
						confValue = bool(int(confValue))	
					defaults[option][0] = confValue
				else:
					defaults[option][0] = self.configuration.get(section, option)
		return defaults
def designPKAOptions ( self ) : try : import pKa . Design_pKa as Design_pKa except ImportError : raise Exceptions . ConfigurationError , "Cannot located Design_pKa module. Check correct path specified in configuration" defaults = Design_pKa . get_defaults ( ) for section in Configuration . scanSections : for option in self . configuration . options ( section ) : if self . configuration . get ( section , option ) == 'None' : defaults [ option ] [ 0 ] = None elif type ( defaults [ option ] [ 0 ] ) == float : defaults [ option ] [ 0 ] = float ( self . configuration . get ( section , option ) ) elif type ( defaults [ option ] [ 0 ] ) == int : defaults [ option ] [ 0 ] = int ( self . configuration . get ( section , option ) ) elif type ( defaults [ option ] [ 0 ] ) == bool : confValue = self . configuration . get ( section , option ) if confValue == 'True' : confValue = True elif confValue == 'False' : confValue = False else : confValue = bool ( int ( confValue ) ) defaults [ option ] [ 0 ] = confValue else : defaults [ option ] [ 0 ] = self . configuration . get ( section , option ) return defaults
Returns the options for the scan calculation in the format used by Design_pKa.run_opt
Exceptions
Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
Returns the options for the scan calculation in the format used by Design_pKa . run_opt Exceptions Raises an Exceptions . EnvironmentError if the pKa modules cannot be found
'''Returns the options for the scan calculation in the format used by Design_pKa.run_opt
		
		Exceptions
			Raises an Exceptions.EnvironmentError if the pKa modules cannot be found''' #Get the default options #Go through sections and set values #print option #print defaults[option] #Do some translating #print 'None conversion - Changed value of %s to %s' % (option, defaults[option]) #print 'Float conversion - Changed value of %s to %s' % (option, defaults[option]) #print 'Int conversion - Chaged value of %s to %s' % (option, defaults[option]) #Accepts 1,0, True and False #print 'Bool - Changed value of ', option, ' to ', defaults[option] #print 'No conversion - Changed value of %s to %s' % (option, defaults[option])
self