def sequence_recovery(native_struct,designed_struct):
	"""calculate percent sequence recovery between a native and designed struct"""
	native_residues = native_struct.get_residues()
	designed_residues = designed_struct.get_residues()
	total = 0.0;
	recovered = 0.0;
	for native,designed in zip(native_residues,designed_residues):
		if native.get_resname() == designed.get_resname():
			recovered += 1
		total += 1
	#print recovered, total
	return recovered/total