Crop genetic diversity in the field and on the farm: principles and applications in research practices