def local_defaults(pdbfile,target_residues,recalc_intpka): """ # Set the parameters that are the same for all mutations """ import pKa.Design_pKa as Design_pKa defaults=Design_pKa.get_defaults() # PDB file defaults['pdb'][0]=pdbfile # # pKa calculation parameters # defaults['pHstart'][0]=0.1 defaults['pHstop'][0]=12.0 defaults['pHstep'][0]=0.25 defaults['pKMCsteps'][0]=200000 # # Design settings # # Target # target_residues=target_residues.split(',') target_text='' for target in target_residues: target_text=target_text+target+'=0.0,' # Dummy pKa value defaults['pKas'][0]=target_text[:-1] # # Method # defaults['MC'][0]=1 defaults['tabulated'][0]=1 defaults['MCsteps'][0]=0 # # Be not-so-noisy # defaults['verbose'][0]=3 # # Minimum distance between target and mutation # #defaults['min_target_dist'][0]=min_dist # # Do not save the solutions # defaults['save_solutions'][0]=None # # defaults['recalc_intpka'][0]=recalc_intpka defaults['recalc_intpka_dist'][0]=10.0 defaults['use_titration_curves'][0]=1 defaults['calc_dpka'][0]=1 defaults['generate_mutations'][0]=False defaults['ligands'][0]=[] defaults['allow_unknown_atoms'][0]=1 defaults['unknown_rad'][0]=0.0 return defaults
def local_defaults(pdbfile, target_residues, recalc_intpka): """ # Set the parameters that are the same for all mutations """ import pKa.Design_pKa as Design_pKa defaults = Design_pKa.get_defaults() # PDB file defaults['pdb'][0] = pdbfile # # pKa calculation parameters # defaults['pHstart'][0] = 0.1 defaults['pHstop'][0] = 12.0 defaults['pHstep'][0] = 0.25 defaults['pKMCsteps'][0] = 200000 # # Design settings # # Target # target_residues = target_residues.split(',') target_text = '' for target in target_residues: target_text = target_text + target + '=0.0,' # Dummy pKa value defaults['pKas'][0] = target_text[:-1] # # Method # defaults['MC'][0] = 1 defaults['tabulated'][0] = 1 defaults['MCsteps'][0] = 0 # # Be not-so-noisy # defaults['verbose'][0] = 3 # # Minimum distance between target and mutation # #defaults['min_target_dist'][0]=min_dist # # Do not save the solutions # defaults['save_solutions'][0] = None # # defaults['recalc_intpka'][0] = recalc_intpka defaults['recalc_intpka_dist'][0] = 10.0 defaults['use_titration_curves'][0] = 1 defaults['calc_dpka'][0] = 1 defaults['generate_mutations'][0] = False defaults['ligands'][0] = [] defaults['allow_unknown_atoms'][0] = 1 defaults['unknown_rad'][0] = 0.0 return defaults
def local_defaults(pdbfile,target_residues,recalc_intpka): """ # Set the parameters that are the same for all mutations """ import pKa.Design_pKa as Design_pKa defaults=Design_pKa.get_defaults() # PDB file defaults['pdb'][0]=pdbfile # # pKa calculation parameters # #defaults['pHstart'][0]=0.1 #defaults['pHstop'][0]=12.0 defaults['pHstep'][0]=0.01 defaults['pKMCsteps'][0]=200000 # # Design settings # # Target # #target_residues=target_residues.split(',') target_text='' for target in target_residues: target_text=target_text+target+'=0.0,' # Dummy pKa value defaults['pKas'][0]=target_text[:-1] # # Method # defaults['dpKa_method']=['MC','junk'] defaults['tabulated'][0]=0 defaults['MCsteps'][0]=0 defaults['stability_mode']=[False,'junk'] defaults['PBEsolver']=['DelPhi','junk'] # # Be not-so-noisy # defaults['verbose'][0]=5 # # Minimum distance between target and mutation # #defaults['min_target_dist'][0]=min_dist # # Do not save the solutions # defaults['save_solutions'][0]=None # # defaults['recalc_intpka'][0]=options.recalc_intpka defaults['recalc_intpka_dist'][0]=options.recalc_intpka_dist defaults['use_titration_curves'][0]=1 defaults['calc_dpka'][0]=1 defaults['generate_mutations'][0]=False defaults['mutation_quality'][0]=0.5 return defaults
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