PEATSA/WebApp/Data.py
def protoolStructure(self):
	
		'''Returns a protool structure instance initialised using the structure data stored in the database'''
		
		import tempfile, Protool
		
		structureData = self.structure()
		temp = tempfile.NamedTemporaryFile()
		temp.write(structureData)
		temp.flush()

		try:
			object = Protool.structureIO()
			object.readpdb(temp.name)
		except Exception, data:	
			raise Exceptions.FileFormatError, 'Format of stored PDB file for job %s not valid.\nUnderlying error - %s' % (self.identification, data)
		finally:
			temp.close()
			
		return object
Returns a protool structure instance initialised using the structure data stored in the database
Returns a protool structure instance initialised using the structure data stored in the database
Returns a protool structure instance initialised using the structure data stored in the database
def protoolStructure(self):
		import tempfile, Protool
		structureData = self.structure()
		temp = tempfile.NamedTemporaryFile()
		temp.write(structureData)
		temp.flush()
		try:
			object = Protool.structureIO()
			object.readpdb(temp.name)
		except Exception, data:	
			raise Exceptions.FileFormatError, 'Format of stored PDB file for job %s not valid.\nUnderlying error - %s' % (self.identification, data)
		finally:
			temp.close()
		return object
def protoolStructure ( self ) : import tempfile , Protool structureData = self . structure ( ) temp = tempfile . NamedTemporaryFile ( ) temp . write ( structureData ) temp . flush ( ) try : object = Protool . structureIO ( ) object . readpdb ( temp . name ) except Exception , data : raise Exceptions . FileFormatError , 'Format of stored PDB file for job %s not valid.\nUnderlying error - %s' % ( self . identification , data ) finally : temp . close ( ) return object
Returns a protool structure instance initialised using the structure data stored in the database
Returns a protool structure instance initialised using the structure data stored in the database
'''Returns a protool structure instance initialised using the structure data stored in the database'''
self