Die Wahlverwandtschaften
Goethe used the concept in his novel Elective Affinities (1809).