3d-dart/server/plugins/ModelNucleicAcids.py
def _MakeDecisions(self, minp=None, maxp=None, pstep=None, def1=None, def2=None):
	
		"""Checks validitie and sets defaults for angle and orient parameters"""
		
		orgminp = self._FormatParams(self.paramdict[minp], minp)
		orgmaxp = self._FormatParams(self.paramdict[maxp], maxp)
		orgpstep = self._FormatParams(self.paramdict[pstep], pstep)
		
		tmpminp = []
		tmpmaxp = []
		tmppstep = []
		
		if orgminp == None and orgmaxp == None:
			print "    * WARNING: No value set for", minp, "and", maxp, "Set to default of:", def1
			tmpminp.append(def1)
			tmpmaxp.append(def1)
			tmppstep.append(None)
		elif orgminp == None and not orgmaxp == None:
			tmpminp = orgmaxp
			tmpmaxp = orgmaxp
			tmppstep.append(None)
			print "    * WARNING: Only value for", maxp, "supplied, set", minp, "equal to", maxp, ":", tmpminp[0] 
		elif not orgminp == None and orgmaxp == None:
			if len(orgminp) == 1:
				tmpminp = orgminp
				tmpmaxp = orgminp
				tmppstep.append(None)
				print "    * Value for",minp,"set to",tmpminp[0]
			elif len(orgminp) == self.paramdict['nrbp']:
				tmpminp = orgminp
				tmpmaxp = orgminp
				tmppstep.append(None)
				print "    * Custom sequence for",minp,"supplied. Set to:",tmpminp
			else:
				tmpminp.append(def1)
				tmpmaxp.append(def1)
				tmppstep.append(None)
				print "    * ERROR: Custom sequence for",minp,"not equal to sequence length. Set to default of", tmpminp[0]
		else:
			if len(orgminp) == 1:
				tmpminp = orgminp
				tmpmaxp = orgmaxp
				if orgpstep == None:
					tmppstep.append(def2)
				else:
					tmppstep = orgpstep
				print "    * Value for",minp," set to:", tmpminp[0], "Value for",maxp,"set to:", tmpmaxp[0]
				print "    * Value for",pstep,"set to:", tmppstep[0]
			elif len(orgminp) == self.nrbp:
				tmpminp = orgminp
				tmpmaxp = orgmaxp
				if orgpstep == None:
					tmppstep.append(def2)
				else:
					tmppstep = orgpstep
				print "    * Custom sequence for",minp," set to:", tmpminp, "Value for",maxp,"set to:", tmpmaxp[0]
				print "    * Value for",pstep,"set to:", tmppstep[0]
				print "    * The values in the custom sequence will be increased", tmppstep[0],"times with a value of:", tmpmaxp[0]	
			else:
				tmpminp.append(def1)
				tmpmaxp.append(def1)
				tmppstep.append(None)
				print "    * ERROR: Custom sequence for",minp,"not equal to sequence length. Set to default of", tmpminp[0]
		
		return tmpminp,tmpmaxp,tmppstep
Checks validitie and sets defaults for angle and orient parameters
Checks validitie and sets defaults for angle and orient parameters
Checks validitie and sets defaults for angle and orient parameters
def _MakeDecisions(self, minp=None, maxp=None, pstep=None, def1=None, def2=None):
		orgminp = self._FormatParams(self.paramdict[minp], minp)
		orgmaxp = self._FormatParams(self.paramdict[maxp], maxp)
		orgpstep = self._FormatParams(self.paramdict[pstep], pstep)
		tmpminp = []
		tmpmaxp = []
		tmppstep = []
		if orgminp == None and orgmaxp == None:
			print "    * WARNING: No value set for", minp, "and", maxp, "Set to default of:", def1
			tmpminp.append(def1)
			tmpmaxp.append(def1)
			tmppstep.append(None)
		elif orgminp == None and not orgmaxp == None:
			tmpminp = orgmaxp
			tmpmaxp = orgmaxp
			tmppstep.append(None)
			print "    * WARNING: Only value for", maxp, "supplied, set", minp, "equal to", maxp, ":", tmpminp[0] 
		elif not orgminp == None and orgmaxp == None:
			if len(orgminp) == 1:
				tmpminp = orgminp
				tmpmaxp = orgminp
				tmppstep.append(None)
				print "    * Value for",minp,"set to",tmpminp[0]
			elif len(orgminp) == self.paramdict['nrbp']:
				tmpminp = orgminp
				tmpmaxp = orgminp
				tmppstep.append(None)
				print "    * Custom sequence for",minp,"supplied. Set to:",tmpminp
			else:
				tmpminp.append(def1)
				tmpmaxp.append(def1)
				tmppstep.append(None)
				print "    * ERROR: Custom sequence for",minp,"not equal to sequence length. Set to default of", tmpminp[0]
		else:
			if len(orgminp) == 1:
				tmpminp = orgminp
				tmpmaxp = orgmaxp
				if orgpstep == None:
					tmppstep.append(def2)
				else:
					tmppstep = orgpstep
				print "    * Value for",minp," set to:", tmpminp[0], "Value for",maxp,"set to:", tmpmaxp[0]
				print "    * Value for",pstep,"set to:", tmppstep[0]
			elif len(orgminp) == self.nrbp:
				tmpminp = orgminp
				tmpmaxp = orgmaxp
				if orgpstep == None:
					tmppstep.append(def2)
				else:
					tmppstep = orgpstep
				print "    * Custom sequence for",minp," set to:", tmpminp, "Value for",maxp,"set to:", tmpmaxp[0]
				print "    * Value for",pstep,"set to:", tmppstep[0]
				print "    * The values in the custom sequence will be increased", tmppstep[0],"times with a value of:", tmpmaxp[0]	
			else:
				tmpminp.append(def1)
				tmpmaxp.append(def1)
				tmppstep.append(None)
				print "    * ERROR: Custom sequence for",minp,"not equal to sequence length. Set to default of", tmpminp[0]
		return tmpminp,tmpmaxp,tmppstep
def _MakeDecisions ( self , minp = None , maxp = None , pstep = None , def1 = None , def2 = None ) : orgminp = self . _FormatParams ( self . paramdict [ minp ] , minp ) orgmaxp = self . _FormatParams ( self . paramdict [ maxp ] , maxp ) orgpstep = self . _FormatParams ( self . paramdict [ pstep ] , pstep ) tmpminp = [ ] tmpmaxp = [ ] tmppstep = [ ] if orgminp == None and orgmaxp == None : print "    * WARNING: No value set for" , minp , "and" , maxp , "Set to default of:" , def1 tmpminp . append ( def1 ) tmpmaxp . append ( def1 ) tmppstep . append ( None ) elif orgminp == None and not orgmaxp == None : tmpminp = orgmaxp tmpmaxp = orgmaxp tmppstep . append ( None ) print "    * WARNING: Only value for" , maxp , "supplied, set" , minp , "equal to" , maxp , ":" , tmpminp [ 0 ] elif not orgminp == None and orgmaxp == None : if len ( orgminp ) == 1 : tmpminp = orgminp tmpmaxp = orgminp tmppstep . append ( None ) print "    * Value for" , minp , "set to" , tmpminp [ 0 ] elif len ( orgminp ) == self . paramdict [ 'nrbp' ] : tmpminp = orgminp tmpmaxp = orgminp tmppstep . append ( None ) print "    * Custom sequence for" , minp , "supplied. Set to:" , tmpminp else : tmpminp . append ( def1 ) tmpmaxp . append ( def1 ) tmppstep . append ( None ) print "    * ERROR: Custom sequence for" , minp , "not equal to sequence length. Set to default of" , tmpminp [ 0 ] else : if len ( orgminp ) == 1 : tmpminp = orgminp tmpmaxp = orgmaxp if orgpstep == None : tmppstep . append ( def2 ) else : tmppstep = orgpstep print "    * Value for" , minp , " set to:" , tmpminp [ 0 ] , "Value for" , maxp , "set to:" , tmpmaxp [ 0 ] print "    * Value for" , pstep , "set to:" , tmppstep [ 0 ] elif len ( orgminp ) == self . nrbp : tmpminp = orgminp tmpmaxp = orgmaxp if orgpstep == None : tmppstep . append ( def2 ) else : tmppstep = orgpstep print "    * Custom sequence for" , minp , " set to:" , tmpminp , "Value for" , maxp , "set to:" , tmpmaxp [ 0 ] print "    * Value for" , pstep , "set to:" , tmppstep [ 0 ] print "    * The values in the custom sequence will be increased" , tmppstep [ 0 ] , "times with a value of:" , tmpmaxp [ 0 ] else : tmpminp . append ( def1 ) tmpmaxp . append ( def1 ) tmppstep . append ( None ) print "    * ERROR: Custom sequence for" , minp , "not equal to sequence length. Set to default of" , tmpminp [ 0 ] return tmpminp , tmpmaxp , tmppstep
Checks validitie and sets defaults for angle and orient parameters
Checks validitie and sets defaults for angle and orient parameters
"""Checks validitie and sets defaults for angle and orient parameters"""
self
minp
maxp
pstep
def1
def2