def sdfGetProp(mol, sdfprop):
	"""
	returns the value of property sdfprop in molecule mol if this property is defined and returns None otherwise
	"""
	sdfkeyvals = mol["keyvals"]
	if not sdfkeyvals:
		return None
	sdfkeys = [pair[0] for pair in sdfkeyvals]
	if sdfprop not in sdfkeys:
		return None
	where = sdfkeys.index(sdfprop)
	value = sdfkeyvals[where][1]
	eol_pos = value.find('\n')
	if eol_pos < 0:
		return ""
	value = value[eol_pos+1:]
	return value