PEATSA/Core/Utilities.py
def CleanPDB(inputFile, outputFile, removeWater=True, removeLigand=True, removeAltLoc=True, addHydrogens=True, correct=True):

	'''Cleans a PDB by adding hydrogens, remove waters, ligands and altlocs and correct bad rotamers (default)
	
	The specific cleaning tasks done can be set using the function keywords arguments
	
	Parameters:
		inputFile - The location of the pdb to clean
		outputFile - The location where the cleaned pdb should be written.
		
	Errors: 
		Raises an exception if the inputFile is not a valid PDB file.'''

	cleanProgram = Environment.appConfiguration.pdbCleanProgram()
	if cleanProgram == "WHATIF":
		CleanWHATIF(inputFile, outputFile, 
			removeWater=removeWater, 
			removeLigand=removeLigand, 
			removeAltLoc=removeAltLoc, 
			addHydrogens=addHydrogens, 
			correct=correct)
	elif cleanProgram == "pdb2pqr": 
		if Environment.appConfiguration.has_option('PDBS', 'forceField'):
			forceField = Environment.appConfiguration.get('PDBS', 'forceField')
		else:
			forceField = 'amber'	

		CleanPDB2PQR(inputFile, outputFile, 
			forceField=forceField,
			removeWater=removeWater, 
			removeLigand=removeLigand, 
			removeAltLoc=removeAltLoc, 
			addHydrogens=addHydrogens, 
			correct=correct)
	else:
		print "Unknown pdb clean program %s specified in configuration - aborting" % cleanProgram
Cleans a PDB by adding hydrogens, remove waters, ligands and altlocs and correct bad rotamers (default)
	
	The specific cleaning tasks done can be set using the function keywords arguments
	
	Parameters:
		inputFile - The location of the pdb to clean
		outputFile - The location where the cleaned pdb should be written.
		
	Errors: 
		Raises an exception if the inputFile is not a valid PDB file.
Cleans a PDB by adding hydrogens, remove waters, ligands and altlocs and correct bad rotamers (default)
The specific cleaning tasks done can be set using the function keywords arguments

The location of the pdb to clean
outputFile - The location where the cleaned pdb should be written.

Raises an exception if the inputFile is not a valid PDB file.
Cleans a PDB by adding hydrogens remove waters ligands and altlocs and correct bad rotamers ( default ) The specific cleaning tasks done can be set using the function keywords arguments The location of the pdb to clean outputFile - The location where the cleaned pdb should be written . Raises an exception if the inputFile is not a valid PDB file .
def CleanPDB(inputFile, outputFile, removeWater=True, removeLigand=True, removeAltLoc=True, addHydrogens=True, correct=True):
	cleanProgram = Environment.appConfiguration.pdbCleanProgram()
	if cleanProgram == "WHATIF":
		CleanWHATIF(inputFile, outputFile, 
			removeWater=removeWater, 
			removeLigand=removeLigand, 
			removeAltLoc=removeAltLoc, 
			addHydrogens=addHydrogens, 
			correct=correct)
	elif cleanProgram == "pdb2pqr": 
		if Environment.appConfiguration.has_option('PDBS', 'forceField'):
			forceField = Environment.appConfiguration.get('PDBS', 'forceField')
		else:
			forceField = 'amber'	
		CleanPDB2PQR(inputFile, outputFile, 
			forceField=forceField,
			removeWater=removeWater, 
			removeLigand=removeLigand, 
			removeAltLoc=removeAltLoc, 
			addHydrogens=addHydrogens, 
			correct=correct)
	else:
		print "Unknown pdb clean program %s specified in configuration - aborting" % cleanProgram
def CleanPDB ( inputFile , outputFile , removeWater = True , removeLigand = True , removeAltLoc = True , addHydrogens = True , correct = True ) : cleanProgram = Environment . appConfiguration . pdbCleanProgram ( ) if cleanProgram == "WHATIF" : CleanWHATIF ( inputFile , outputFile , removeWater = removeWater , removeLigand = removeLigand , removeAltLoc = removeAltLoc , addHydrogens = addHydrogens , correct = correct ) elif cleanProgram == "pdb2pqr" : if Environment . appConfiguration . has_option ( 'PDBS' , 'forceField' ) : forceField = Environment . appConfiguration . get ( 'PDBS' , 'forceField' ) else : forceField = 'amber' CleanPDB2PQR ( inputFile , outputFile , forceField = forceField , removeWater = removeWater , removeLigand = removeLigand , removeAltLoc = removeAltLoc , addHydrogens = addHydrogens , correct = correct ) else : print "Unknown pdb clean program %s specified in configuration - aborting" % cleanProgram
Cleans a PDB by adding hydrogens, remove waters, ligands and altlocs and correct bad rotamers (default)
The specific cleaning tasks done can be set using the function keywords arguments
Cleans a PDB by adding hydrogens remove waters ligands and altlocs and correct bad rotamers ( default ) The specific cleaning tasks done can be set using the function keywords arguments
'''Cleans a PDB by adding hydrogens, remove waters, ligands and altlocs and correct bad rotamers (default)
	
	The specific cleaning tasks done can be set using the function keywords arguments
	
	Parameters:
		inputFile - The location of the pdb to clean
		outputFile - The location where the cleaned pdb should be written.
		
	Errors: 
		Raises an exception if the inputFile is not a valid PDB file.'''
inputFile
outputFile
removeWater
removeLigand
removeAltLoc
addHydrogens
correct