PEATSA/Core/ProteinDesignTool.py
def CreateMutants(pdbFile, configuration, parser, environment, cleanPDB=False):

	'''Creates a set of mutant pdbs based on the command line options'''

	environment.output('[PEAT-SA] Generating mutants now ...')
	ligandFile = None
	if parser.ligandFile() is not None:
		ligandFile = [parser.ligandFile()]
		
	#Check if a mutation list was provided
	#If not create a scan list
	if parser.mutationListFile() is not None:
		filename = parser.mutationListFile()
		object = Data.MutationListFile(filename)
		#Validate - Will raise an exception if it fails
		errorData = {}
		if not object.validateOnPDB(pdbFile, errorData):
			raise Exceptions.MutationListValidationError, errorData["errorString"] 
		else:	
			mutationList = object.mutantList()
	else:
		skipResidueTypes = []
		if parser.scanMutation() is 'ALA' or parser.scanMutation() is 'GLY':
			skipResidueTypes.append('ALA')
			skipResidueTypes.append('GLY')
		else:
			skipResidueTypes.append(parser.scanMutation())	

		mutationList = Data.CreateScanList(pdbFile=pdbFile, mutation=parser.scanMutation(), skipResidueTypes=skipResidueTypes)	
		
	#Check if the overlap (mutationQuality) was specified on the command line
	
	overlap = configuration.getfloat('PKA SCAN PARAMETERS', 'mutation_quality')
	if parser.mutationQuality() is not None:
		overlap = parser.mutationQuality()
		environment.output('[PEAT-SA] Overriding conf mutation quality with command line value of %f' % overlap)
		
	#Create the collection		
	mutantCollection = Data.MutantCollection(pdbFile=pdbFile,
					name=parser.outputName(),
					mutationList=mutationList,
					ligandFiles=ligandFile,
					location=parser.outputDirectory(),
					maxOverlap=overlap,
					clean=cleanPDB)
				
				
	environment.output("[PEAT-SA] Finished mutant creation - %s" % datetime.datetime.now().strftime('%H:%M:%S'))
				
	environment.output('[PEAT-SA] Complete - %s' % mutantCollection)
	return mutantCollection
Creates a set of mutant pdbs based on the command line options
Creates a set of mutant pdbs based on the command line options
Creates a set of mutant pdbs based on the command line options
def CreateMutants(pdbFile, configuration, parser, environment, cleanPDB=False):
	environment.output('[PEAT-SA] Generating mutants now ...')
	ligandFile = None
	if parser.ligandFile() is not None:
		ligandFile = [parser.ligandFile()]
	if parser.mutationListFile() is not None:
		filename = parser.mutationListFile()
		object = Data.MutationListFile(filename)
		errorData = {}
		if not object.validateOnPDB(pdbFile, errorData):
			raise Exceptions.MutationListValidationError, errorData["errorString"] 
		else:	
			mutationList = object.mutantList()
	else:
		skipResidueTypes = []
		if parser.scanMutation() is 'ALA' or parser.scanMutation() is 'GLY':
			skipResidueTypes.append('ALA')
			skipResidueTypes.append('GLY')
		else:
			skipResidueTypes.append(parser.scanMutation())	
		mutationList = Data.CreateScanList(pdbFile=pdbFile, mutation=parser.scanMutation(), skipResidueTypes=skipResidueTypes)	
	overlap = configuration.getfloat('PKA SCAN PARAMETERS', 'mutation_quality')
	if parser.mutationQuality() is not None:
		overlap = parser.mutationQuality()
		environment.output('[PEAT-SA] Overriding conf mutation quality with command line value of %f' % overlap)
	mutantCollection = Data.MutantCollection(pdbFile=pdbFile,
					name=parser.outputName(),
					mutationList=mutationList,
					ligandFiles=ligandFile,
					location=parser.outputDirectory(),
					maxOverlap=overlap,
					clean=cleanPDB)
	environment.output("[PEAT-SA] Finished mutant creation - %s" % datetime.datetime.now().strftime('%H:%M:%S'))
	environment.output('[PEAT-SA] Complete - %s' % mutantCollection)
	return mutantCollection
def CreateMutants ( pdbFile , configuration , parser , environment , cleanPDB = False ) : environment . output ( '[PEAT-SA] Generating mutants now ...' ) ligandFile = None if parser . ligandFile ( ) is not None : ligandFile = [ parser . ligandFile ( ) ] if parser . mutationListFile ( ) is not None : filename = parser . mutationListFile ( ) object = Data . MutationListFile ( filename ) errorData = { } if not object . validateOnPDB ( pdbFile , errorData ) : raise Exceptions . MutationListValidationError , errorData [ "errorString" ] else : mutationList = object . mutantList ( ) else : skipResidueTypes = [ ] if parser . scanMutation ( ) is 'ALA' or parser . scanMutation ( ) is 'GLY' : skipResidueTypes . append ( 'ALA' ) skipResidueTypes . append ( 'GLY' ) else : skipResidueTypes . append ( parser . scanMutation ( ) ) mutationList = Data . CreateScanList ( pdbFile = pdbFile , mutation = parser . scanMutation ( ) , skipResidueTypes = skipResidueTypes ) overlap = configuration . getfloat ( 'PKA SCAN PARAMETERS' , 'mutation_quality' ) if parser . mutationQuality ( ) is not None : overlap = parser . mutationQuality ( ) environment . output ( '[PEAT-SA] Overriding conf mutation quality with command line value of %f' % overlap ) mutantCollection = Data . MutantCollection ( pdbFile = pdbFile , name = parser . outputName ( ) , mutationList = mutationList , ligandFiles = ligandFile , location = parser . outputDirectory ( ) , maxOverlap = overlap , clean = cleanPDB ) environment . output ( "[PEAT-SA] Finished mutant creation - %s" % datetime . datetime . now ( ) . strftime ( '%H:%M:%S' ) ) environment . output ( '[PEAT-SA] Complete - %s' % mutantCollection ) return mutantCollection
Creates a set of mutant pdbs based on the command line options
Creates a set of mutant pdbs based on the command line options
'''Creates a set of mutant pdbs based on the command line options''' #Check if a mutation list was provided #If not create a scan list #Validate - Will raise an exception if it fails #Check if the overlap (mutationQuality) was specified on the command line #Create the collection		
pdbFile
configuration
parser
environment
cleanPDB