PEATSA/Core/Programs.py
def ResidueCodeCompare(residue1, residue2):
	
	'''Compares two residue codes which have the form ChainID:ResidueNumber
	
	Note: Actually can compare any code where the components are separated by colons
	and the second element is the residue number
	Also note this does not take into accound possible different chain ids.
		
	Returns an integer - Meaning is the same as the inbuilt cmp function'''	

	residue1 = int(residue1.split(':')[1])
	residue2 = int(residue2.split(':')[1])
	
	if residue1 > residue2:
		return 1
	elif residue1 < residue2:
		return -1
	else:
		return 0
Compares two residue codes which have the form ChainID:ResidueNumber
	
	Note: Actually can compare any code where the components are separated by colons
	and the second element is the residue number
	Also note this does not take into accound possible different chain ids.
		
	Returns an integer - Meaning is the same as the inbuilt cmp function
Compares two residue codes which have the form ChainID:ResidueNumber
Note: Actually can compare any code where the components are separated by colons
and the second element is the residue number
Also note this does not take into accound possible different chain ids.

Returns an integer - Meaning is the same as the inbuilt cmp function
Compares two residue codes which have the form ChainID : ResidueNumber Note : Actually can compare any code where the components are separated by colons and the second element is the residue number Also note this does not take into accound possible different chain ids . Returns an integer - Meaning is the same as the inbuilt cmp function
def ResidueCodeCompare(residue1, residue2):
	residue1 = int(residue1.split(':')[1])
	residue2 = int(residue2.split(':')[1])
	if residue1 > residue2:
		return 1
	elif residue1 < residue2:
		return -1
	else:
		return 0
def ResidueCodeCompare ( residue1 , residue2 ) : residue1 = int ( residue1 . split ( ':' ) [ 1 ] ) residue2 = int ( residue2 . split ( ':' ) [ 1 ] ) if residue1 > residue2 : return 1 elif residue1 < residue2 : return - 1 else : return 0
Compares two residue codes which have the form ChainID:ResidueNumber
Note: Actually can compare any code where the components are separated by colons
and the second element is the residue number
Also note this does not take into accound possible different chain ids.
Compares two residue codes which have the form ChainID : ResidueNumber Note : Actually can compare any code where the components are separated by colons and the second element is the residue number Also note this does not take into accound possible different chain ids .
'''Compares two residue codes which have the form ChainID:ResidueNumber
	
	Note: Actually can compare any code where the components are separated by colons
	and the second element is the residue number
	Also note this does not take into accound possible different chain ids.
		
	Returns an integer - Meaning is the same as the inbuilt cmp function'''
residue1
residue2