A new definition of functional groups and a general procedure for their identification in organic structures